Skip to content

Instantly share code, notes, and snippets.

@sh1nj1
Created May 13, 2015 09:46
Show Gist options
  • Save sh1nj1/4a0cbee9dee0734773df to your computer and use it in GitHub Desktop.
Save sh1nj1/4a0cbee9dee0734773df to your computer and use it in GitHub Desktop.
jks to crt and key
keytool -list -keystore keystore.jks
keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype PKCS12 -srcalias alias -deststorepass password
openssl pkcs12 -in keystore.p12 -nokeys -out cert.pem
openssl pkcs12 -in keystore.p12 -nodes -nocerts -out key.pem
openssl x509 -outform der -in cert.pem -out cert.crt
openssl rsa -in key.pem -out key.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment