I have tried with NSS_NoDB_Init, which returns -5977
(PR_LOAD_LIBRARY_ERROR).
Later I have copied following files into the directory of my standalone
application:

Freebl3.dll
Mozcrt19.dll
Nspr4.dll
Nss3.dll
Nssckbi.dll
Nssdbm3.dll
Nssutil.dll
Plc4.dll
Plds.dll
Softokn3.dll
Sqlite3.dll
Freebl3.chk
Softokn3.chk

Now NSS_NoDB_Init success and both keys are generated property.

¿is this list enough or are more files that I need?

-----Mensaje original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] En nombre
de Robert Relyea
Enviado el: lunes, 15 de septiembre de 2008 18:42
Para: mozilla's crypto code discussion list
Asunto: Re: Beginner with NSS

Francisco Puentes wrote:
> Being a beginner with NSS, I need help :-(
>
> I am trying to generate a RSA pair of keys with this code:
>
>     NSS_Init("./rsa.db");
>   
NSS_Init requires a pointer to a directory (which should already exist). 
You should check the error code coming back for NSS_Init. It's probably
failing.

>     SECKEYPublicKey*rsaPbKey=NULL;
>  
> SECKEYPrivateKey*rsaPrKey=SECKEY_CreateRSAPrivateKey(1024,&rsaPbKey,NU
> LL);
>   
Just a note: this will produce an ephemeral key (non-persistent). I can't
tell if that's what you want from your code fragment or not.
>     ...
>     NSS_Shutdown();
>
> But all seems to be wrong, rsaPrKey (and its partner) are always NULL.
>
> What is wrong?
>
>
>
> _______________________________________________
> dev-tech-crypto mailing list
> dev-tech-crypto@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-crypto
>   


_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to