Emil Assarsson wrote:
This is what I needed to do to make it work...

PK11_ImportEncryptedPrivateKeyInfo(
    keySlot, /* the slot which the key should be on */
        epkey,     /* an encrypted key info */
    pwitem,     /* a prepared password */
    nickname,  /* a prepered nickname */
           pubvalue,  /* an _empty_ secitem if you don't
            have the public key (not a NULL) */

The purpose of the public value is so that NSS can later find the private key at a time when NSS knows only the corresponding public key. If you use an empty secitem, NSS will not later be able to find the private key from the public key.

    PR_TRUE, /* ??? */
    PR_TRUE, /* ??? */
    rsaKey, /* type of key */
    0, /* key usage ???? */
    NULL)) /* wincx */

Emil

_______________________________________________ mozilla-crypto mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-crypto

Reply via email to