[Libreoffice-commits] core.git: xmlsecurity/source

Tor Lillqvist tml at collabora.com
Thu Dec 4 07:03:48 PST 2014


 xmlsecurity/source/helper/xsecsign.cxx                               |    2 -
 xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx      |   16 +++++-----
 xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx |    1 
 xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx       |   12 +++----
 xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx              |   16 +++++-----
 xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx         |   13 +-------
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx               |   12 +++----
 7 files changed, 32 insertions(+), 40 deletions(-)

New commits:
commit 71c58fce69cc1a463d9b9a5711718211adf414fe
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 4 16:55:19 2014 +0200

    Bin noise comments
    
    Change-Id: I084040ff90ee30aa83ac5d3ad11365768272ec65

diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index a44aa7c..b67933f 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -86,7 +86,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
     args[1] = cssu::makeAny(m_xSAXEventKeeper);
     args[2] = cssu::makeAny(OUString::number(nIdOfSignatureElementCollector));
 
-    //i39448 : for nss, the internal module is used for signing, which needs to be improved later
+    //for nss, the internal module is used for signing, which needs to be improved later
     sal_Int32 nEnvIndex = internalSignatureInfor.signatureInfor.nSecurityEnvironmentIndex;
     if( nEnvIndex < 0 || nEnvIndex >= m_xSecurityContext->getSecurityEnvironmentNumber())
     {// set defaultEnv
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
index 7b92f86..1ee9831 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
@@ -148,7 +148,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
 
      setErrorRecorder( );
 
-    pMngr = pSecEnv->createKeysManager() ; //i39448
+    pMngr = pSecEnv->createKeysManager();
     if( !pMngr ) {
         throw RuntimeException() ;
     }
@@ -157,7 +157,7 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
     pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
     if( pEncCtx == NULL )
     {
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         //throw XMLEncryptionException() ;
         clearErrorRecorder();
         return aTemplate;
@@ -167,13 +167,13 @@ SAL_CALL XMLEncryption_MSCryptImpl :: encrypt(
     if( xmlSecEncCtxXmlEncrypt( pEncCtx , pEncryptedData , pContent ) < 0 ) {
         aTemplate->setStatus(::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN);
         xmlSecEncCtxDestroy( pEncCtx ) ;
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         clearErrorRecorder();
         return aTemplate;
     }
     aTemplate->setStatus(::com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED);
     xmlSecEncCtxDestroy( pEncCtx ) ;
-    pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+    pSecEnv->destroyKeysManager( pMngr );
 
     //get the new EncryptedData element
     if (isParentRef)
@@ -254,7 +254,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
 
      setErrorRecorder( );
 
-    pMngr = pSecEnv->createKeysManager() ; //i39448
+    pMngr = pSecEnv->createKeysManager();
     if( !pMngr ) {
         throw RuntimeException() ;
     }
@@ -263,7 +263,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
     pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
     if( pEncCtx == NULL )
     {
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         //throw XMLEncryptionException() ;
         clearErrorRecorder();
         return aTemplate;
@@ -273,7 +273,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
     if( xmlSecEncCtxDecrypt( pEncCtx , pEncryptedData ) < 0 || pEncCtx->result == NULL ) {
         aTemplate->setStatus(::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN);
         xmlSecEncCtxDestroy( pEncCtx ) ;
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
 
         //throw XMLEncryptionException() ;
         clearErrorRecorder();
@@ -306,7 +306,7 @@ XMLEncryption_MSCryptImpl :: decrypt(
 
     //Destroy the encryption context
     xmlSecEncCtxDestroy( pEncCtx ) ;
-    pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+    pSecEnv->destroyKeysManager( pMngr );
 
     //get the decrypted element
     XMLElementWrapper_XmlSecImpl * ret = new XMLElementWrapper_XmlSecImpl(isParentRef?
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
index 53307a7..dbe738b 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
@@ -63,7 +63,6 @@ XMLSecurityContext_MSCryptImpl :: ~XMLSecurityContext_MSCryptImpl() {
     xmlSecShutdown() ;
 }
 
-//i39448 : new methods
 sal_Int32 SAL_CALL XMLSecurityContext_MSCryptImpl::addSecurityEnvironment(
     const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment)
     throw (::com::sun::star::security::SecurityInfrastructureException, ::com::sun::star::uno::RuntimeException)
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index 1075d70..939704f 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -106,7 +106,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
 
      setErrorRecorder( );
 
-    pMngr = pSecEnv->createKeysManager() ; //i39448
+    pMngr = pSecEnv->createKeysManager();
     if( !pMngr ) {
         throw RuntimeException() ;
     }
@@ -116,7 +116,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
     if( pDsigCtx == NULL )
     {
         //throw XMLSignatureException() ;
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         clearErrorRecorder();
         return aTemplate;
     }
@@ -136,7 +136,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: generate(
 
 
     xmlSecDSigCtxDestroy( pDsigCtx ) ;
-    pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+    pSecEnv->destroyKeysManager( pMngr );
 
     //Unregistered the stream/URI binding
     if( xUriBinding.is() )
@@ -203,7 +203,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: validate(
 
      setErrorRecorder( );
 
-    pMngr = pSecEnv->createKeysManager() ; //i39448
+    pMngr = pSecEnv->createKeysManager();
     if( !pMngr ) {
         throw RuntimeException() ;
     }
@@ -212,7 +212,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: validate(
     pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
     if( pDsigCtx == NULL )
     {
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         clearErrorRecorder();
         return aTemplate;
     }
@@ -237,7 +237,7 @@ SAL_CALL XMLSignature_MSCryptImpl :: validate(
     }
 
     xmlSecDSigCtxDestroy( pDsigCtx ) ;
-    pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+    pSecEnv->destroyKeysManager( pMngr );
 
     //Unregistered the stream/URI binding
     if( xUriBinding.is() )
diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
index 75fb4ee..8e7e6bc 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
@@ -144,7 +144,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
 
      setErrorRecorder( );
 
-    pMngr = pSecEnv->createKeysManager() ; //i39448
+    pMngr = pSecEnv->createKeysManager();
     if( !pMngr ) {
         throw RuntimeException() ;
     }
@@ -153,7 +153,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
     pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
     if( pEncCtx == NULL )
     {
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         //throw XMLEncryptionException() ;
         clearErrorRecorder();
         return aTemplate;
@@ -165,7 +165,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
     if( xmlSecEncCtxXmlEncrypt( pEncCtx , pEncryptedData , pContent ) < 0 )
     {
         xmlSecEncCtxDestroy( pEncCtx ) ;
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
 
         //throw XMLEncryptionException() ;
         clearErrorRecorder();
@@ -173,7 +173,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
     }
 
     xmlSecEncCtxDestroy( pEncCtx ) ;
-    pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+    pSecEnv->destroyKeysManager( pMngr );
 
     //get the new EncryptedData element
     if (isParentRef)
@@ -265,7 +265,7 @@ SAL_CALL XMLEncryption_NssImpl :: decrypt(
         if( pSecEnv == NULL )
             throw RuntimeException() ;
 
-        pMngr = pSecEnv->createKeysManager() ; //i39448
+        pMngr = pSecEnv->createKeysManager();
         if( !pMngr ) {
             throw RuntimeException() ;
         }
@@ -274,7 +274,7 @@ SAL_CALL XMLEncryption_NssImpl :: decrypt(
         pEncCtx = xmlSecEncCtxCreate( pMngr ) ;
         if( pEncCtx == NULL )
         {
-            pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+            pSecEnv->destroyKeysManager( pMngr );
             //throw XMLEncryptionException() ;
             clearErrorRecorder();
             return aTemplate;
@@ -287,7 +287,7 @@ SAL_CALL XMLEncryption_NssImpl :: decrypt(
 
             //Destroy the encryption context
             xmlSecEncCtxDestroy( pEncCtx ) ;
-            pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+            pSecEnv->destroyKeysManager( pMngr );
 
             //get the decrypted element
             XMLElementWrapper_XmlSecImpl * ret = new XMLElementWrapper_XmlSecImpl(isParentRef?
@@ -301,7 +301,7 @@ SAL_CALL XMLEncryption_NssImpl :: decrypt(
         {
             //The decryption fails, continue with the next security environment
             xmlSecEncCtxDestroy( pEncCtx ) ;
-            pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+            pSecEnv->destroyKeysManager( pMngr );
         }
     }
 
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index 6e6dd2f..217192b 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -35,9 +35,7 @@ using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
 using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
 
 XMLSecurityContext_NssImpl :: XMLSecurityContext_NssImpl()
-    ://i39448 : m_pKeysMngr( NULL ) ,
-    m_nDefaultEnvIndex(-1)
-    //m_xSecurityEnvironment( NULL )
+    : m_nDefaultEnvIndex(-1)
 {
     //Init xmlsec library
     if( xmlSecInit() < 0 ) {
@@ -58,15 +56,13 @@ XMLSecurityContext_NssImpl :: XMLSecurityContext_NssImpl()
     }
 }
 
-XMLSecurityContext_NssImpl :: ~XMLSecurityContext_NssImpl() {
-    //i39448
-
+XMLSecurityContext_NssImpl :: ~XMLSecurityContext_NssImpl()
+{
     xmlDisableStreamInputCallbacks() ;
     xmlSecCryptoShutdown() ;
     xmlSecShutdown() ;
 }
 
-//i39448 : new methods
 sal_Int32 SAL_CALL XMLSecurityContext_NssImpl::addSecurityEnvironment(
     const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment)
     throw (::com::sun::star::security::SecurityInfrastructureException, ::com::sun::star::uno::RuntimeException, std::exception)
@@ -126,9 +122,6 @@ void SAL_CALL XMLSecurityContext_NssImpl::setDefaultSecurityEnvironmentIndex( sa
     m_nDefaultEnvIndex = nDefaultEnvIndex;
 }
 
-//i39448 : old methods deleted
-
-
 /* XServiceInfo */
 OUString SAL_CALL XMLSecurityContext_NssImpl :: getImplementationName() throw( RuntimeException, std::exception ) {
     return impl_getImplementationName() ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 82211dc..a4e57b3 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -107,7 +107,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
          throw RuntimeException() ;
     }
 
-    //i39448 : the key manager should be retrieved from SecurityEnvironment, instead of SecurityContext
+    // the key manager should be retrieved from SecurityEnvironment, instead of SecurityContext
 
     SecurityEnvironment_NssImpl* pSecEnv =
         reinterpret_cast<SecurityEnvironment_NssImpl*>(
@@ -118,7 +118,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
 
      setErrorRecorder();
 
-    pMngr = pSecEnv->createKeysManager() ; //i39448
+    pMngr = pSecEnv->createKeysManager();
     if( !pMngr ) {
         throw RuntimeException() ;
     }
@@ -127,7 +127,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
     pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
     if( pDsigCtx == NULL )
     {
-        pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+        pSecEnv->destroyKeysManager( pMngr );
         //throw XMLSignatureException() ;
         clearErrorRecorder();
         return aTemplate;
@@ -148,7 +148,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
 
 
     xmlSecDSigCtxDestroy( pDsigCtx ) ;
-    pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+    pSecEnv->destroyKeysManager( pMngr );
 
     //Unregistered the stream/URI binding
     if( xUriBinding.is() )
@@ -226,7 +226,7 @@ SAL_CALL XMLSignature_NssImpl :: validate(
         if( pSecEnv == NULL )
             throw RuntimeException() ;
 
-        pMngr = pSecEnv->createKeysManager() ; //i39448
+        pMngr = pSecEnv->createKeysManager();
         if( !pMngr ) {
             throw RuntimeException() ;
         }
@@ -235,7 +235,7 @@ SAL_CALL XMLSignature_NssImpl :: validate(
         pDsigCtx = xmlSecDSigCtxCreate( pMngr ) ;
         if( pDsigCtx == NULL )
         {
-            pSecEnv->destroyKeysManager( pMngr ) ; //i39448
+            pSecEnv->destroyKeysManager( pMngr );
             //throw XMLSignatureException() ;
             clearErrorRecorder();
             return aTemplate;


More information about the Libreoffice-commits mailing list