summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-29 09:07:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-29 23:42:26 +0000
commit309574394bd4ae3e9e10e5ff0d64bdd7bbbc8b83 (patch)
treef8b8cea0a81bc74ca34e8bda2d0dfce939b28ce0 /xmlsecurity
parent20deac4903fc0697477e855feeff482b3da234f9 (diff)
callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after... commit b44cbb26efe1d0b0950b1e1613e131b506dc3876 Author: Noel Grandin <noel@peralex.com> Date: Tue Jan 20 12:38:10 2015 +0200 new loplugin: change virtual methods to non-virtual Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx92
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx91
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx5
4 files changed, 0 insertions, 193 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 71cbcd04fcbe..0999e132eb8e 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -322,22 +322,6 @@ void SecurityEnvironment_MSCryptImpl :: adoptSymKey( HCRYPTKEY aSymKey ) throw(
}
}
-void SecurityEnvironment_MSCryptImpl :: rejectSymKey( HCRYPTKEY aSymKey ) throw( Exception , RuntimeException ) {
- HCRYPTKEY symkey ;
- std::list< HCRYPTKEY >::iterator keyIt ;
-
- if( aSymKey != NULL ) {
- for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
- if( *keyIt == aSymKey ) {
- symkey = *keyIt ;
- CryptDestroyKey( symkey ) ;
- m_tSymKeyList.erase( keyIt ) ;
- break ;
- }
- }
- }
-}
-
HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getSymKey( unsigned int position ) throw( Exception , RuntimeException ) {
HCRYPTKEY symkey ;
std::list< HCRYPTKEY >::iterator keyIt ;
@@ -352,44 +336,6 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getSymKey( unsigned int position )
return symkey ;
}
-void SecurityEnvironment_MSCryptImpl :: adoptPubKey( HCRYPTKEY aPubKey ) throw( Exception , RuntimeException ) {
- HCRYPTKEY pubkey ;
- std::list< HCRYPTKEY >::iterator keyIt ;
-
- if( aPubKey != NULL ) {
- //First try to find the key in the list
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPubKey )
- return ;
- }
-
- //If we do not find the key in the list, add a new node
- pubkey = aPubKey ;
-
- try {
- m_tPubKeyList.push_back( pubkey ) ;
- } catch ( Exception& ) {
- CryptDestroyKey( pubkey ) ;
- }
- }
-}
-
-void SecurityEnvironment_MSCryptImpl :: rejectPubKey( HCRYPTKEY aPubKey ) throw( Exception , RuntimeException ) {
- HCRYPTKEY pubkey ;
- std::list< HCRYPTKEY >::iterator keyIt ;
-
- if( aPubKey != NULL ) {
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPubKey ) {
- pubkey = *keyIt ;
- CryptDestroyKey( pubkey ) ;
- m_tPubKeyList.erase( keyIt ) ;
- break ;
- }
- }
- }
-}
-
HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPubKey( unsigned int position ) throw( Exception , RuntimeException ) {
HCRYPTKEY pubkey ;
std::list< HCRYPTKEY >::iterator keyIt ;
@@ -404,44 +350,6 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPubKey( unsigned int position )
return pubkey ;
}
-void SecurityEnvironment_MSCryptImpl :: adoptPriKey( HCRYPTKEY aPriKey ) throw( Exception , RuntimeException ) {
- HCRYPTKEY prikey ;
- std::list< HCRYPTKEY >::iterator keyIt ;
-
- if( aPriKey != NULL ) {
- //First try to find the key in the list
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPriKey )
- return ;
- }
-
- //If we do not find the key in the list, add a new node
- prikey = aPriKey ;
-
- try {
- m_tPriKeyList.push_back( prikey ) ;
- } catch ( Exception& ) {
- CryptDestroyKey( prikey ) ;
- }
- }
-}
-
-void SecurityEnvironment_MSCryptImpl :: rejectPriKey( HCRYPTKEY aPriKey ) throw( Exception , RuntimeException ) {
- HCRYPTKEY prikey ;
- std::list< HCRYPTKEY >::iterator keyIt ;
-
- if( aPriKey != NULL ) {
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPriKey ) {
- prikey = *keyIt ;
- CryptDestroyKey( prikey ) ;
- m_tPriKeyList.erase( keyIt ) ;
- break ;
- }
- }
- }
-}
-
HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPriKey( unsigned int position ) throw( Exception , RuntimeException ) {
HCRYPTKEY prikey ;
std::list< HCRYPTKEY >::iterator keyIt ;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index b0d74d525e89..b4a0e5770b97 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -170,15 +170,10 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper3<
virtual void setCertDb( HCERTSTORE aCertDb ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptSymKey( HCRYPTKEY aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- virtual void rejectSymKey( HCRYPTKEY aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual HCRYPTKEY getSymKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- virtual void adoptPubKey( HCRYPTKEY aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- virtual void rejectPubKey( HCRYPTKEY aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual HCRYPTKEY getPubKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- virtual void adoptPriKey( HCRYPTKEY aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- virtual void rejectPriKey( HCRYPTKEY aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual HCRYPTKEY getPriKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void enableDefaultCrypt( sal_Bool enable ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 7ee875443d0a..b59e9a087ad5 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -254,21 +254,6 @@ void SecurityEnvironment_NssImpl :: adoptSymKey( PK11SymKey* aSymKey ) throw( Ex
}
}
-void SecurityEnvironment_NssImpl :: rejectSymKey( PK11SymKey* aSymKey ) throw( Exception , RuntimeException ) {
- std::list< PK11SymKey* >::iterator keyIt ;
-
- if( aSymKey != NULL ) {
- for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
- if( *keyIt == aSymKey ) {
- PK11SymKey* symkey = *keyIt ;
- PK11_FreeSymKey( symkey ) ;
- m_tSymKeyList.erase( keyIt ) ;
- break ;
- }
- }
- }
-}
-
PK11SymKey* SecurityEnvironment_NssImpl :: getSymKey( unsigned int position ) throw( Exception , RuntimeException ) {
PK11SymKey* symkey ;
std::list< PK11SymKey* >::iterator keyIt ;
@@ -283,44 +268,6 @@ PK11SymKey* SecurityEnvironment_NssImpl :: getSymKey( unsigned int position ) th
return symkey ;
}
-void SecurityEnvironment_NssImpl :: adoptPubKey( SECKEYPublicKey* aPubKey ) throw( Exception , RuntimeException ) {
- std::list< SECKEYPublicKey* >::iterator keyIt ;
-
- if( aPubKey != NULL ) {
- //First try to find the key in the list
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPubKey )
- return ;
- }
-
- //If we do not find the key in the list, add a new node
- SECKEYPublicKey* pubkey = SECKEY_CopyPublicKey( aPubKey ) ;
- if( pubkey == NULL )
- throw RuntimeException() ;
-
- try {
- m_tPubKeyList.push_back( pubkey ) ;
- } catch ( Exception& ) {
- SECKEY_DestroyPublicKey( pubkey ) ;
- }
- }
-}
-
-void SecurityEnvironment_NssImpl :: rejectPubKey( SECKEYPublicKey* aPubKey ) throw( Exception , RuntimeException ) {
- std::list< SECKEYPublicKey* >::iterator keyIt ;
-
- if( aPubKey != NULL ) {
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPubKey ) {
- SECKEYPublicKey* pubkey = *keyIt ;
- SECKEY_DestroyPublicKey( pubkey ) ;
- m_tPubKeyList.erase( keyIt ) ;
- break ;
- }
- }
- }
-}
-
SECKEYPublicKey* SecurityEnvironment_NssImpl :: getPubKey( unsigned int position ) throw( Exception , RuntimeException ) {
SECKEYPublicKey* pubkey ;
std::list< SECKEYPublicKey* >::iterator keyIt ;
@@ -335,44 +282,6 @@ SECKEYPublicKey* SecurityEnvironment_NssImpl :: getPubKey( unsigned int position
return pubkey ;
}
-void SecurityEnvironment_NssImpl :: adoptPriKey( SECKEYPrivateKey* aPriKey ) throw( Exception , RuntimeException ) {
- std::list< SECKEYPrivateKey* >::iterator keyIt ;
-
- if( aPriKey != NULL ) {
- //First try to find the key in the list
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPriKey )
- return ;
- }
-
- //If we do not find the key in the list, add a new node
- SECKEYPrivateKey* prikey = SECKEY_CopyPrivateKey( aPriKey ) ;
- if( prikey == NULL )
- throw RuntimeException() ;
-
- try {
- m_tPriKeyList.push_back( prikey ) ;
- } catch ( Exception& ) {
- SECKEY_DestroyPrivateKey( prikey ) ;
- }
- }
-}
-
-void SecurityEnvironment_NssImpl :: rejectPriKey( SECKEYPrivateKey* aPriKey ) throw( Exception , RuntimeException ) {
- std::list< SECKEYPrivateKey* >::iterator keyIt ;
-
- if( aPriKey != NULL ) {
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
- if( *keyIt == aPriKey ) {
- SECKEYPrivateKey* prikey = *keyIt ;
- SECKEY_DestroyPrivateKey( prikey ) ;
- m_tPriKeyList.erase( keyIt ) ;
- break ;
- }
- }
- }
-}
-
SECKEYPrivateKey* SecurityEnvironment_NssImpl :: getPriKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) {
SECKEYPrivateKey* prikey ;
std::list< SECKEYPrivateKey* >::iterator keyIt ;
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
index 18ae0b2ecd75..dd0bc10b249c 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
@@ -112,15 +112,10 @@ private :
void setCertDb( CERTCertDBHandle* aCertDb ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
void adoptSymKey( PK11SymKey* aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- void rejectSymKey( PK11SymKey* aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
PK11SymKey* getSymKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- void adoptPubKey( SECKEYPublicKey* aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- void rejectPubKey( SECKEYPublicKey* aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
SECKEYPublicKey* getPubKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- void adoptPriKey( SECKEYPrivateKey* aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
- void rejectPriKey( SECKEYPrivateKey* aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
SECKEYPrivateKey* getPriKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL getPersonalCertificates() throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE ;