On 8/16/07, Brad Hards <[EMAIL PROTECTED]> wrote:
> G'day,
>
> I'm just getting started with a NSS backend for the Qt Cryptographic
> Architecture (see:
> http://websvn.kde.org/trunk/kdesupport/qca/plugins/qca-nss/qca-nss.cpp?view=markup
> for the code).
>
> I am having success with basic crypto ops (cipher, hashing, hmac), but things
> got a bit messier when I started with RSA key generation. For the basic ops,
> I'm using   NSS_NoDB_Init(".");
>
> However PK11_GenerateKeyPair() doesn't appear to work with this. It does work
> with NSS_InitReadWrite(".") though.

Could you try passing PR_FALSE as the fifth argument (named 'isPerm' or 'token')
to PK11_GenerateKeyPair()?  That'll cause PK11_GenerateKeyPair() to generate
the private and public keys as "session" objects rather than "token" (permanent)
objects, which is what you want.  Please let us know if that works.

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

Reply via email to