Last active
December 26, 2015 23:49
-
-
Save Snugglepantz/7233429 to your computer and use it in GitHub Desktop.
Keytool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change the following JVM options so that they point to the location and name of the new keystore. Add this in domain.xml under java-config: | |
<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options> | |
<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate Certificate | |
keytool -genkey -alias server-alias -keyalg RSA -keypass changeit --storepass changeit -keystore keystore.jks | |
# Export generated server certificate in keystore.jks into the file server.cer | |
keytool -export -alias server-alias -storepass changeit -file server.cer -keystore keystore.jks | |
# Create the trust-store file cacerts.jks and add server certificate to it | |
keytool -import -v -trustcacerts -alias server-alias -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment