diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-03 13:51:35 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-03 13:51:35 +0000 |
commit | 98d53cbc902195529e12e42e9450a394f801649c (patch) | |
tree | ea0e86c8d1e173928b883da362cc895bec3a1622 /xmlsecurity | |
parent | 02ff95fc2d70379b7b239e775f60b199f1da90a4 (diff) |
CWS-TOOLING: integrate CWS jl124
2009-04-01 13:35:16 +0200 jl r270322 : #i100555# alway print out unopkg\'s output when invoked while building the installation sets
2009-04-01 13:32:53 +0200 jl r270321 : #i96697# use smard card even if it cannot generate a DES3 key
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 6aa6f009212a..d0e6670fd2ff 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -448,21 +448,34 @@ void SecurityEnvironment_NssImpl::updateSlots() if(pSlot != NULL) { RTL_LOGFILE_TRACE2( "XMLSEC: Found a slot: SlotName=%s, TokenName=%s", PK11_GetSlotName(pSlot), PK11_GetTokenName(pSlot) ); - pSymKey = PK11_KeyGen( pSlot , CKM_DES3_CBC, NULL, 128, NULL ) ; - if( pSymKey == NULL ) - { - PK11_FreeSlot( pSlot ) ; - RTL_LOGFILE_TRACE( "XMLSEC: Error - pSymKey is NULL" ); - continue; - } +//The following code which is commented out checks if a slot, that is a smart card for example, is +// able to generate a symmetric key of type CKM_DES3_CBC. If this fails then this token +// will not be used. This key is possibly used for the encryption service. However, all +// interfaces and services used for public key signature and encryption are not published +// and the encryption is not used in OOo. Therefore it does not do any harm to remove +// this code, hence allowing smart cards which cannot generate this type of key. +// +// By doing this, the encryption may fail if a smart card is being used which does not +// support this key generation. +// + pSymKey = PK11_KeyGen( pSlot , CKM_DES3_CBC, NULL, 128, NULL ) ; +// if( pSymKey == NULL ) +// { +// PK11_FreeSlot( pSlot ) ; +// RTL_LOGFILE_TRACE( "XMLSEC: Error - pSymKey is NULL" ); +// continue; +// } addCryptoSlot(pSlot); PK11_FreeSlot( pSlot ) ; pSlot = NULL; - adoptSymKey( pSymKey ) ; - PK11_FreeSymKey( pSymKey ) ; - pSymKey = NULL; + if (pSymKey != NULL) + { + adoptSymKey( pSymKey ) ; + PK11_FreeSymKey( pSymKey ) ; + pSymKey = NULL; + } }// end of if(pSlot != NULL) }// end of for |