Dave Townsend wrote, On 2008-05-28 10:46:
> I am writing code that exports and imports private keys from the 
> internal key slot (using an EncryptedPrivateKeyInfo structure). I have 
> the export working, the files written out seem to be readable by openssl 
> so I think that side is fine.
> 
> The problem comes on import. If the key slot already contains the same 
> private key that is being imported then 
> PK11_ImportDERPrivateKeyInfoAndReturnKey returns a failure. The failure 
> is a generic SECFailure so I cannot tell if it failed because the key 
> already existed or if the data itself was faulty in some way. In 
> addition some properties of the key that already exists are changed by 
> the import (the nickname f.e.).

Did you check the error code by calling PORT_GetError or PR_GetError?
What error code did you get?

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

Reply via email to