Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: pkcs11 help

6 views
Skip to first unread message

Julien Pierre

unread,
Dec 2, 2004, 11:26:08 PM12/2/04
to smith
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 .

smith

unread,
Dec 2, 2004, 10:21:55 PM12/2/04
to

smith

unread,
Dec 4, 2004, 10:22:19 PM12/4/04
to smith
thanks for you help,now i use NSS_Initialize()func to do,and i don't
know if i use a arithmetic that i define myself how do i put it to the
SECMOD_AddNewModule() func's the third param or have any other ways to
do that,thanks
0 new messages