summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjpierre%netscape.com <devnull@localhost>2002-03-01 00:37:42 +0000
committerjpierre%netscape.com <devnull@localhost>2002-03-01 00:37:42 +0000
commit85c8dc5fe21793984360426db3568cc4cc03c2a1 (patch)
tree0f4a40596ff3f707dafdf03ba02208e78b36865b
parent135e4d2a1d10944eb41cba7713c1c486b97e5115 (diff)
downloadnss-hg-85c8dc5fe21793984360426db3568cc4cc03c2a1.tar.gz
Fix for 128355 - add SECMOD_AddNewModuleEx to take module parameters
-rw-r--r--security/nss/lib/nss/nss.def7
-rw-r--r--security/nss/lib/pk11wrap/pk11util.c17
-rw-r--r--security/nss/lib/pk11wrap/secmod.h6
3 files changed, 24 insertions, 6 deletions
diff --git a/security/nss/lib/nss/nss.def b/security/nss/lib/nss/nss.def
index 7c34e6fad..174a7c1f1 100644
--- a/security/nss/lib/nss/nss.def
+++ b/security/nss/lib/nss/nss.def
@@ -560,11 +560,12 @@ PK11_DestroyPBEParams;
;+};
;+NSS_3.4 { # NSS 3.4 release
;+ global:
-SECMOD_LoadModule;
-SECMOD_GetModuleSpecList;
+SECMOD_AddNewModuleEx;
+SECMOD_DeleteModule;
SECMOD_FreeModuleSpecList;
+SECMOD_GetModuleSpecList;
+SECMOD_LoadModule;
SECMOD_UpdateModule;
-SECMOD_DeleteModule;
;+# for PKCS #12
PK11_RawPBEKeyGen;
;+# for PSM
diff --git a/security/nss/lib/pk11wrap/pk11util.c b/security/nss/lib/pk11wrap/pk11util.c
index c72294ef6..04feb3059 100644
--- a/security/nss/lib/pk11wrap/pk11util.c
+++ b/security/nss/lib/pk11wrap/pk11util.c
@@ -408,9 +408,11 @@ PK11_IsFIPS(void)
/* combines NewModule() & AddModule */
/* give a string for the module name & the full-path for the dll, */
/* installs the PKCS11 module & update registry */
-SECStatus SECMOD_AddNewModule(char* moduleName, char* dllPath,
+SECStatus SECMOD_AddNewModuleEx(char* moduleName, char* dllPath,
unsigned long defaultMechanismFlags,
- unsigned long cipherEnableFlags) {
+ unsigned long cipherEnableFlags,
+ char* modparms,
+ char* nssparms) {
SECMODModule *module;
SECStatus result = SECFailure;
int s,i;
@@ -418,7 +420,7 @@ SECStatus SECMOD_AddNewModule(char* moduleName, char* dllPath,
PR_SetErrorText(0, NULL);
- module = SECMOD_CreateModule(dllPath,moduleName,NULL, NULL);
+ module = SECMOD_CreateModule(dllPath,moduleName, modparms, nssparms);
if (module->dllName != NULL) {
if (module->dllName[0] != 0) {
@@ -455,6 +457,15 @@ SECStatus SECMOD_AddNewModule(char* moduleName, char* dllPath,
return result;
}
+SECStatus SECMOD_AddNewModule(char* moduleName, char* dllPath,
+ unsigned long defaultMechanismFlags,
+ unsigned long cipherEnableFlags)
+{
+ return SECMOD_AddNewModuleEx(moduleName, dllPath, defaultMechanismFlags,
+ cipherEnableFlags,
+ NULL, NULL); /* don't pass module or nss params */
+}
+
SECStatus SECMOD_UpdateModule(SECMODModule *module)
{
SECStatus result;
diff --git a/security/nss/lib/pk11wrap/secmod.h b/security/nss/lib/pk11wrap/secmod.h
index ad3b7e024..51920dbb9 100644
--- a/security/nss/lib/pk11wrap/secmod.h
+++ b/security/nss/lib/pk11wrap/secmod.h
@@ -113,6 +113,12 @@ extern SECStatus SECMOD_DeleteInternalModule(char *name);
extern SECStatus SECMOD_AddNewModule(char* moduleName, char* dllPath,
unsigned long defaultMechanismFlags,
unsigned long cipherEnableFlags);
+extern SECStatus SECMOD_AddNewModuleEx(char* moduleName, char* dllPath,
+ unsigned long defaultMechanismFlags,
+ unsigned long cipherEnableFlags,
+ char* modparms,
+ char* nssparms);
+
/* database/memory management */
extern SECMODModule *SECMOD_GetInternalModule(void);
extern SECMODModule *SECMOD_ReferenceModule(SECMODModule *module);