diff options
author | julien.pierre.boogz%sun.com <devnull@localhost> | 2007-11-16 02:04:57 +0000 |
---|---|---|
committer | julien.pierre.boogz%sun.com <devnull@localhost> | 2007-11-16 02:04:57 +0000 |
commit | 40a019e4a2288aa048917613c1f3f1b45ca4fb11 (patch) | |
tree | 55bae65f8bd043a134cfcdb44896a898d5e9fc05 | |
parent | 3acfc4a99c89df036123e458c000187507d96ae8 (diff) | |
download | nss-hg-40a019e4a2288aa048917613c1f3f1b45ca4fb11.tar.gz |
Fix for bug 403957 . nss_InitLock should be replaced with PZ_NewLock in softoken . r=nelson,wtc
-rw-r--r-- | security/nss/lib/softoken/legacydb/keydb.c | 5 | ||||
-rw-r--r-- | security/nss/lib/softoken/legacydb/pcertdb.c | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/security/nss/lib/softoken/legacydb/keydb.c b/security/nss/lib/softoken/legacydb/keydb.c index 4756a4632..9502cdf56 100644 --- a/security/nss/lib/softoken/legacydb/keydb.c +++ b/security/nss/lib/softoken/legacydb/keydb.c @@ -45,7 +45,6 @@ #include "pcert.h" #include "mcom_db.h" #include "secerr.h" -#include "nsslocks.h" #include "keydbi.h" #include "lgdb.h" @@ -63,7 +62,7 @@ /* Size of the global salt for key database */ #define SALT_LENGTH 16 -SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate); +SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate) const SEC_ASN1Template nsslowkey_EncryptedPrivateKeyInfoTemplate[] = { { SEC_ASN1_SEQUENCE, @@ -115,7 +114,7 @@ static void keydb_InitLocks(NSSLOWKEYDBHandle *handle) { if (handle->lock == NULL) { - nss_InitLock(&handle->lock, nssILockKeyDB); + handle->lock = PZ_NewLock(nssILockKeyDB); } return; diff --git a/security/nss/lib/softoken/legacydb/pcertdb.c b/security/nss/lib/softoken/legacydb/pcertdb.c index 7dd71811a..966164db1 100644 --- a/security/nss/lib/softoken/legacydb/pcertdb.c +++ b/security/nss/lib/softoken/legacydb/pcertdb.c @@ -46,7 +46,6 @@ #include "secitem.h" #include "secder.h" -#include "nsslocks.h" #include "secerr.h" #include "lgdb.h" @@ -87,7 +86,7 @@ void certdb_InitDBLock(NSSLOWCERTCertDBHandle *handle) { if (dbLock == NULL) { - nss_InitLock(&dbLock, nssILockCertDB); + dbLock = PZ_NewLock(nssILockCertDB); PORT_Assert(dbLock != NULL); } } @@ -96,19 +95,19 @@ SECStatus nsslowcert_InitLocks(void) { if (freeListLock == NULL) { - nss_InitLock(&freeListLock, nssILockRefLock); + freeListLock = PZ_NewLock(nssILockRefLock); if (freeListLock == NULL) { return SECFailure; } } if (certRefCountLock == NULL) { - nss_InitLock(&certRefCountLock, nssILockRefLock); + certRefCountLock = PZ_NewLock(nssILockRefLock); if (certRefCountLock == NULL) { return SECFailure; } } if (certTrustLock == NULL ) { - nss_InitLock(&certTrustLock, nssILockCertDB); + certTrustLock = PZ_NewLock(nssILockCertDB); if (certTrustLock == NULL) { return SECFailure; } |