summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMichael Mi <mmi@openoffice.org>2004-09-09 07:25:08 +0000
committerMichael Mi <mmi@openoffice.org>2004-09-09 07:25:08 +0000
commitc7e01d8d3f5eec372e5d9b4809607c6a937956db (patch)
treed558563a07b4faf428d75e06cdda9dafafc80226 /xmlsecurity
parent7bb3f968debe3ec26769eae51dff170916f20381 (diff)
Issue number: 33927
Submitted by: Andrew Fan Reviewed by: Disable CryptContextAddRef and CryptDuplicateKey, which aren't supported by WINNT 4.0.
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index aa97530dfb82..0cb8c55967bc 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: securityenvironment_mscryptimpl.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: kz $ $Date: 2004-09-02 14:19:40 $
+ * last change: $Author: mmi $ $Date: 2004-09-09 08:25:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -234,10 +234,13 @@ void SecurityEnvironment_MSCryptImpl :: setCryptoProvider( HCRYPTPROV aProv ) th
}
if( aProv != NULL ) {
+ /*- Replaced by direct adopt for WINNT support ----
if( !CryptContextAddRef( aProv, NULL, NULL ) )
throw Exception() ;
else
m_hProv = aProv ;
+ ----*/
+ m_hProv = aProv ;
}
}
@@ -293,8 +296,11 @@ void SecurityEnvironment_MSCryptImpl :: adoptSymKey( HCRYPTKEY aSymKey ) throw(
}
//If we do not find the key in the list, add a new node
+ /*- Replaced with directly adopt for WINNT 4.0 support ----
if( !CryptDuplicateKey( aSymKey, NULL, 0, &symkey ) )
throw RuntimeException() ;
+ ----*/
+ symkey = aSymKey ;
try {
m_tSymKeyList.push_back( symkey ) ;
@@ -346,8 +352,11 @@ void SecurityEnvironment_MSCryptImpl :: adoptPubKey( HCRYPTKEY aPubKey ) throw(
}
//If we do not find the key in the list, add a new node
+ /*- Replaced with directly adopt for WINNT 4.0 support ----
if( !CryptDuplicateKey( aPubKey, NULL, 0, &pubkey ) )
throw RuntimeException() ;
+ ----*/
+ pubkey = aPubKey ;
try {
m_tPubKeyList.push_back( pubkey ) ;
@@ -399,8 +408,11 @@ void SecurityEnvironment_MSCryptImpl :: adoptPriKey( HCRYPTKEY aPriKey ) throw(
}
//If we do not find the key in the list, add a new node
+ /*- Replaced with directly adopt for WINNT 4.0 support ----
if( !CryptDuplicateKey( aPriKey, NULL, 0, &prikey ) )
throw RuntimeException() ;
+ ----*/
+ prikey = aPriKey ;
try {
m_tPriKeyList.push_back( prikey ) ;