smith wrote:
> i am a new person of pkcs11,now i use nss392 to load my pkcs11 module,my
> code is
>
> long lRet = NSS_NoDB_Init("F:\\mozilla\\test\\Debug");
> lRet = SECMOD_AddNewModule("p11", F:\\mozilla\\test\\Debug\\pkcs11.dll",
> SECMOD_RSA_FLAG, 0);
> but SECMOD_AddNewModule()return -1, and i did not know where was wrong,
> and i hope somebody can give me a sample code that loaded pkcs11 module
> use the nss.
> thanks in advance
SECMOD_AddNewModule tries to add the module to the secmod.db, which
doesn't exist since you called NSS_NoDB_Init .
Either switch to NSS_Initialize to run with a db, or use
SECMOD_LoadUserModule .