Skip to content

Instantly share code, notes, and snippets.

@TomTasche
Created September 1, 2014 18:00
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 TomTasche/4e36a8d7e82f12e7f7f0 to your computer and use it in GitHub Desktop.
Save TomTasche/4e36a8d7e82f12e7f7f0 to your computer and use it in GitHub Desktop.
commands i used to extract the ssl-certificate from a running system for usage with heroku
keytool -list -keystore keystore.jks
keytool -export -alias 1 -keystore store.jks -file store2.crt
openssl x509 -in store2.crt -out store2-pem.crt -outform pem -inform der
keytool -v -importkeystore -srckeystore store.jks -srcalias 1 -destkeystore store2.p12 -deststoretype PKCS12
openssl pkcs12 -in store2.p12 -out store2.pem
openssl rsa -in store2.key -inform DER -out store2-nopw.key
# https://devcenter.heroku.com/articles/ssl-endpoint#update-certificate
heroku certs:update store2-pem.crt store2-nopw.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment