0

I want to generate p12 file from existing pem and key file using keytool

Can anyone implemented it?

Thanks in Advance

Divya
  • 3
  • 1
  • 2
  • Does this answer your question? [How to import an existing X.509 certificate and private key in Java keystore to use in SSL?](https://stackoverflow.com/questions/906402/how-to-import-an-existing-x-509-certificate-and-private-key-in-java-keystore-to) – always_a_rookie Jul 21 '21 at 13:29

1 Answers1

0
keytool -genkeypair -alias key -keystore something.keystore -dname "CN=YourCN,O=Thing,C=US" -validity 9999

keytool -importkeystore -srckeystore something.keystore -destkeystore something.p12 -srcstoretype JKS -deststoretype PKCS12 -deststorepass something
Vizzyy
  • 522
  • 3
  • 11