Security/CryptoEngineering/Platform Use of NSS: Difference between revisions

→‎Loading PKCS#11 Modules: remove readOnly flag from moduleSpec
(→‎Loading New PKCS#11 Modules: add code snippet for how to implement this)
(→‎Loading PKCS#11 Modules: remove readOnly flag from moduleSpec)
 
Line 41: Line 41:
       // To load the PKCS#11 modules saved in another NSS secmod.db (in the       
       // To load the PKCS#11 modules saved in another NSS secmod.db (in the       
       // directory 'other'):                                                     
       // directory 'other'):                                                     
       char* moduleSpec = "name=\"NSS Internal Module\" parameters=\"configdir='other/' certPrefix='' keyPrefix='' secmod='secmod.db' flags=readOnly,optimizeSpace updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' \" NSS=\"flags=internal,moduleDB,moduleDBOnly,critical,defaultModDB,internalKeySlot\"";
       char* moduleSpec = "name=\"NSS Internal Module\" parameters=\"configdir='other/' certPrefix='' keyPrefix='' secmod='secmod.db' flags=optimizeSpace updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' \" NSS=\"flags=internal,moduleDB,moduleDBOnly,critical,defaultModDB,internalKeySlot\"";
       SECMODModule* module = SECMOD_LoadModule(moduleSpec, NULL, 1);             
       SECMODModule* module = SECMOD_LoadModule(moduleSpec, NULL, 1);             
       if (!module) {                                                             
       if (!module) {                                                             
Confirmed users
299

edits