ninety-seven
Operating Steps for Keystore Exporting Private Key (. Key)

be careful

  1. Please use the OpenSSL tool to complete the following operations
  2. Suppose there is a keystore file in the current directory, named: keystore, and the password is: password

Converting from JKS to PKCS12

 keytool -importkeystore -srckeystore keystore -destkeystore keystore_old.p12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass password -deststorepass password -srcalias server -destalias xxx -srckeypass password -destkeypass password -noprompt

Convert from PKCS12 to PEM format

 openssl pkcs12 -in keystore_old.p12 -out keystore_old.pem -passin pass:password -passout pass:password

Take out private key

Open the PEM format file with Notepad, take the private key from the PEM format certificate chain, and save it as privateKey.key

Generate private key

openssl rsa -in privateKey.key -check The private key will be displayed on the command line interface

Does this help solve your problem? resolved Unresolved

Submitted successfully! Thank you very much for your feedback, and we will continue to strive to do better! We are sorry that we were unable to resolve your question. We have received your feedback and will give feedback in time!