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

Tor Lillqvist tml at collabora.com
Wed Dec 21 15:50:22 UTC 2016


 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |   66 ----------
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx |    9 -
 2 files changed, 1 insertion(+), 74 deletions(-)

New commits:
commit 317278525afbaca6d1f0f49b36046b419032733c
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Dec 21 17:45:45 2016 +0200

    Bin now unused fields
    
    Change-Id: Ie2179bc61ca59a5f5ea2bed1c5c0b2c1dea55474

diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 2c76152..599cebf 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -105,7 +105,7 @@ void traceTrustStatus(DWORD err)
     }
 }
 
-SecurityEnvironment_MSCryptImpl::SecurityEnvironment_MSCryptImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_hProv( NULL ) , m_pszContainer( nullptr ) , m_hKeyStore( nullptr ), m_hCertStore( nullptr ), m_hMySystemStore(nullptr), m_hRootSystemStore(nullptr), m_hTrustSystemStore(nullptr), m_hCaSystemStore(nullptr), m_bEnableDefault( false ), m_tSymKeyList() , m_tPubKeyList() , m_xServiceManager( aFactory ){
+SecurityEnvironment_MSCryptImpl::SecurityEnvironment_MSCryptImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_hProv( NULL ) , m_pszContainer( nullptr ) , m_hKeyStore( nullptr ), m_hCertStore( nullptr ), m_hMySystemStore(nullptr), m_hRootSystemStore(nullptr), m_hTrustSystemStore(nullptr), m_hCaSystemStore(nullptr), m_bEnableDefault( false ), m_xServiceManager( aFactory ){
 
 }
 
@@ -151,20 +151,6 @@ SecurityEnvironment_MSCryptImpl::~SecurityEnvironment_MSCryptImpl() {
         CertCloseStore( m_hCaSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ;
         m_hCaSystemStore = nullptr ;
     }
-
-    if( !m_tSymKeyList.empty()  ) {
-        std::list< HCRYPTKEY >::iterator symKeyIt ;
-
-        for( symKeyIt = m_tSymKeyList.begin() ; symKeyIt != m_tSymKeyList.end() ; ++symKeyIt )
-            CryptDestroyKey( *symKeyIt ) ;
-    }
-
-    if( !m_tPubKeyList.empty()  ) {
-        std::list< HCRYPTKEY >::iterator pubKeyIt ;
-
-        for( pubKeyIt = m_tPubKeyList.begin() ; pubKeyIt != m_tPubKeyList.end() ; ++pubKeyIt )
-            CryptDestroyKey( *pubKeyIt ) ;
-    }
 }
 
 /* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index 725da0d..3f4129a 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -75,10 +75,6 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper<
         //Enable default system cryptography setting
         bool                                m_bEnableDefault ;
 
-        //External keys
-        std::list< HCRYPTKEY >              m_tSymKeyList ;
-        std::list< HCRYPTKEY >              m_tPubKeyList ;
-
         //Service manager
         css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager ;
 
commit 62fe303d167fbfe99d41cfa625942486e65fbe06
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Dec 21 17:44:11 2016 +0200

    Bin now unused functions
    
    Change-Id: I515279becbb219c94a52bb1ebf9d1ab33402dae0

diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 9da1520..2c76152 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -294,56 +294,6 @@ void SecurityEnvironment_MSCryptImpl::setCertDb( HCERTSTORE aCertDb ) throw( Exc
     }
 }
 
-void SecurityEnvironment_MSCryptImpl::adoptSymKey( HCRYPTKEY aSymKey ) throw( Exception , RuntimeException ) {
-    HCRYPTKEY   symkey ;
-    std::list< HCRYPTKEY >::iterator keyIt ;
-
-    if( aSymKey != NULL ) {
-        //First try to find the key in the list
-        for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
-            if( *keyIt == aSymKey )
-                return ;
-        }
-
-        //If we do not find the key in the list, add a new node
-        symkey = aSymKey ;
-
-        try {
-            m_tSymKeyList.push_back( symkey ) ;
-        } catch ( Exception& ) {
-            CryptDestroyKey( symkey ) ;
-        }
-    }
-}
-
-HCRYPTKEY SecurityEnvironment_MSCryptImpl::getSymKey( unsigned int position ) throw( Exception , RuntimeException ) {
-    HCRYPTKEY symkey ;
-    std::list< HCRYPTKEY >::iterator keyIt ;
-    unsigned int pos ;
-
-    symkey = NULL ;
-    for( pos = 0, keyIt = m_tSymKeyList.begin() ; pos < position && keyIt != m_tSymKeyList.end() ; ++pos , ++keyIt ) ;
-
-    if( pos == position && keyIt != m_tSymKeyList.end() )
-        symkey = *keyIt ;
-
-    return symkey ;
-}
-
-HCRYPTKEY SecurityEnvironment_MSCryptImpl::getPubKey( unsigned int position ) throw( Exception , RuntimeException ) {
-    HCRYPTKEY pubkey ;
-    std::list< HCRYPTKEY >::iterator keyIt ;
-    unsigned int pos ;
-
-    pubkey = NULL ;
-    for( pos = 0, keyIt = m_tPubKeyList.begin() ; pos < position && keyIt != m_tPubKeyList.end() ; ++pos , ++keyIt ) ;
-
-    if( pos == position && keyIt != m_tPubKeyList.end() )
-        pubkey = *keyIt ;
-
-    return pubkey ;
-}
-
 #ifdef SAL_LOG_INFO
 
 // Based on sample code from MSDN
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index 5136db9..725da0d 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -167,11 +167,6 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper<
         HCERTSTORE getCertDb() throw( css::uno::Exception , css::uno::RuntimeException ) ;
         void setCertDb( HCERTSTORE aCertDb ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
 
-        void adoptSymKey( HCRYPTKEY aSymKey ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
-        HCRYPTKEY getSymKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
-
-        HCRYPTKEY getPubKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
-
         void enableDefaultCrypt( bool enable ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
         bool defaultEnabled() throw( css::uno::Exception , css::uno::RuntimeException ) ;
 


More information about the Libreoffice-commits mailing list