0

I generated my private key with openssl and it is file serverkey.pem, I have also serverreq.pem that I sent to cert authority. They will send me signed certificate.

Is there any way how to convert serverkey.pem into Java Key Store? Do I have to generate something else or does it need only private key serverkey.pem? Can I do it with Keytool?

I know how to import cacerts and the signed cert into existing JKS, but I don't know how to create JKS from private key PEM. Thanks for any help.

hiimjames
  • 431
  • 4
  • 10
  • does [this](http://stackoverflow.com/questions/2138940/import-pem-into-java-key-store) help you – Ankur Singhal Dec 14 '14 at 16:17
  • Seems good, but I'm unable to convert my PEM into DER as @Brian Knoblauch, I don't know if my file is correct it sttarts with -----BEGIN ENCRYPTED PRIVATE KEY----- and I'm getting error: WARNING: can't open config file: c:/openssl-1.0.1i-win32/ssl/openssl.cnf unable to load certificate 1068:error:0906D06C:PEM routines:PEM_read_bio:no start line:.\crypto\pem\pem_lib.c:703:Expecting: TRUSTED CERTIFICATE – hiimjames Dec 14 '14 at 16:41

0 Answers0