Skip to content

Instantly share code, notes, and snippets.

@Justintime50
Created October 21, 2020 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Justintime50/8bdbccdf9ca306f22c341111871f5b0f to your computer and use it in GitHub Desktop.
Save Justintime50/8bdbccdf9ca306f22c341111871f5b0f to your computer and use it in GitHub Desktop.
Convert JKS (Java Keystore) Files to PEM Files

Convert JKS (Java Keystore) Files to PEM Files

Install

This process requires keytool and openssl.

Usage

keytool -importkeystore -srckeystore my_in_file.jks -destkeystore my_out_file.p12 -deststoretype PKCS12
openssl pkcs12 -in my_in_file.p12 -nokeys -out my_out_file.cer.pem
openssl pkcs12 -in my_in_file.p12 -nodes -nocerts -out my_out_file.key.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment