Last active
September 4, 2017 05:57
-
-
Save matr1xp/60a310e36e6eceb90ba533eb10412a26 to your computer and use it in GitHub Desktop.
Generate self-signed certificate for Tomcat using SpringBoot framework
This file contains hidden or 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 self signed certificate: | |
keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 \ | |
-ext SAN=dns:my.domain.com,ip:1.1.1.1 | |
# copy keystore.p12 to any of your classpathentry paths, e.g. /src/main/resources. | |
# Add following to your application.properties file: | |
server.ssl.key-store=classpath:keystore.p12 | |
server.ssl.key-store-password=*password* | |
server.ssl.keyStoreType=PKCS12 | |
server.ssl.keyAlias=tomcat | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment