summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-11-25 17:16:59 +0200
committerTor Lillqvist <tml@collabora.com>2016-11-28 11:40:04 +0200
commitfb414a04fc38e0cf77a0e8d5cb65542d1df8dae8 (patch)
treeb887c68dbb6b1b6d1abd6d16403550859492d6f6 /xmlsecurity
parent9d99a7b2d1dd973b50a699440ffb69d99d614607 (diff)
Bin SecurityEnvironment_MSCryptImpl::m_tPriKeyList as it was always empty
Change-Id: I5f35c702ff9a613c6601cd0c3c42e9fc4f4e26a6
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx29
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx1
2 files changed, 3 insertions, 27 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 2ae6251abda5..bdc8a8e06c56 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_tPriKeyList(), 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_tSymKeyList() , m_tPubKeyList() , m_xServiceManager( aFactory ){
}
@@ -165,14 +165,6 @@ SecurityEnvironment_MSCryptImpl::~SecurityEnvironment_MSCryptImpl() {
for( pubKeyIt = m_tPubKeyList.begin() ; pubKeyIt != m_tPubKeyList.end() ; ++pubKeyIt )
CryptDestroyKey( *pubKeyIt ) ;
}
-
- if( !m_tPriKeyList.empty() ) {
- std::list< HCRYPTKEY >::iterator priKeyIt ;
-
- for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; ++priKeyIt )
- CryptDestroyKey( *priKeyIt ) ;
- }
-
}
/* XServiceInfo */
@@ -353,18 +345,8 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl::getPubKey( unsigned int position ) th
return pubkey ;
}
-HCRYPTKEY SecurityEnvironment_MSCryptImpl::getPriKey( unsigned int position ) throw( Exception , RuntimeException ) {
- HCRYPTKEY prikey ;
- std::list< HCRYPTKEY >::iterator keyIt ;
- unsigned int pos ;
-
- prikey = NULL ;
- for( pos = 0, keyIt = m_tPriKeyList.begin() ; pos < position && keyIt != m_tPriKeyList.end() ; ++pos , ++keyIt ) ;
-
- if( pos == position && keyIt != m_tPriKeyList.end() )
- prikey = *keyIt ;
-
- return prikey ;
+HCRYPTKEY SecurityEnvironment_MSCryptImpl::getPriKey( unsigned int ) throw( Exception , RuntimeException ) {
+ return NULL ;
}
#ifdef SAL_LOG_INFO
@@ -452,11 +434,6 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl::getPerso
}
}
- //secondly, we try to find certificate from registered private keys.
- if( !m_tPriKeyList.empty() ) {
- //TODO: Don't know whether or not it is necessary ans possible.
- }
-
//Thirdly, we try to find certificate from system default key store.
if( m_bEnableDefault ) {
HCERTSTORE hSystemKeyStore ;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index e345c1e9e763..d4cdab612faf 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -78,7 +78,6 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper<
//External keys
std::list< HCRYPTKEY > m_tSymKeyList ;
std::list< HCRYPTKEY > m_tPubKeyList ;
- std::list< HCRYPTKEY > m_tPriKeyList ;
//Service manager
css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager ;