Build a dummy module list. This allows JSS to work when NSS has been NSS_3_3_BRANCH
authornicolson%netscape.com
Tue, 03 Jul 2001 21:11:06 +0000
branchNSS_3_3_BRANCH
changeset 1712 399ad9228f7852b5e9ff3dbdfa6a5e6135d2dfbb
parent 1711 d7d2b9dc1340394a91ba81317dc233e7b341215d
child 1715 48134f1296f7b68d6110baef195eb84c736e4afc
child 1720 147d220e2e85008d1ab1fe20916959f5456af6ac
push idunknown
push userunknown
push dateunknown
Build a dummy module list. This allows JSS to work when NSS has been initialized with NSS_NoDB_Init.
security/nss/lib/pk11wrap/pk11util.c
--- a/security/nss/lib/pk11wrap/pk11util.c
+++ b/security/nss/lib/pk11wrap/pk11util.c
@@ -227,16 +227,22 @@ SECMOD_GetInternalModule(void) {
 /* called from  security/cmd/swfort/instinit, which doesn't need a full 
  * security LIBRARY (it used the swfortezza code, but it does have to verify
  * cert chains against it's own list of certs. We need to initialize the 
  * security code without any database.
  */
 void
 SECMOD_SetInternalModule( SECMODModule *mod) {
    internalModule = SECMOD_ReferenceModule(mod);
+   modules = SECMOD_NewModuleListElement();
+   modules->module = SECMOD_ReferenceModule(mod);
+   modules->next = NULL;
+   if (!moduleLock) {
+       moduleLock = SECMOD_NewListLock();
+   }
 }
 
 /*
  * get the list of PKCS11 modules that are available.
  */
 SECMODModuleList *SECMOD_GetDefaultModuleList() { return modules; }
 SECMODListLock *SECMOD_GetDefaultModuleListLock() { return moduleLock; }