Found it! Nothing to do with Export function. My password function added a '\0' in the end, so I could not open it.
...
Emil Assarsson wrote:
Yes!!!!! Thanks Robert, I got the key. Now I will try to figure out how to check it.
It looks fine when I derdump it, but when I try to open it with "openssl pkcs8 -inform der -in privkey.der" it bails out...
But I think this has more to do with openssl. (Ignore)
Robert Relyea wrote:
The code looks right... except you really need to check the epkey returned. There are lots of environmental reasons why this function may fail (token the privkey is in isn't logged int, the token doesn't support wrapping private keys, token the privkey lives in can't generate the PBE, etc). If you check the error code and look at the secerr returned you would get a better idea of what went wrong.
bob
_______________________________________________ mozilla-crypto mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-crypto
