Hi

 

Which PKCS format does the output of openssl command “genrsa” conform to?  I want to store the private key in a Java Keystore.  To do that, I need to first convert the encoded private key bytes into a KeySpec.  I use PKCS8EncodedKeySpec class to encode PKCS8 keys but can’t use this class for keys generated with “genrsa”.

 

If the output of genrsa does not conform to any PKCS format, then I might have to call openssl’s “pkcs8” command from my Java application to carry out the conversion.  Has anyone does this?

 

Thanks

Hasnain.

Reply via email to