Skip to content

Instantly share code, notes, and snippets.

@markoradinovic
Created February 13, 2015 21:24
Show Gist options
  • Save markoradinovic/81e0ff3c0b3ba2a438c1 to your computer and use it in GitHub Desktop.
Save markoradinovic/81e0ff3c0b3ba2a438c1 to your computer and use it in GitHub Desktop.
SSL Import to java keystore
# Create PKCS12 keystore from private key and public certificate.
openssl pkcs12 -export -name myservercert -in selfsigned.crt -inkey server.key -out keystore.p12
# Convert PKCS12 keystore into a JKS keystore
keytool -importkeystore -destkeystore mykeystore.jks -srckeystore keystore.p12 -srcstoretype pkcs12 -alias myservercert
keytool -list -v -keystore mykeystore.jks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment