Created
January 24, 2019 07:56
-
-
Save awabcodes/8d7d62c43d6368534f5f4f7a7853a995 to your computer and use it in GitHub Desktop.
[Keytool Commands] #keytool #java
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
# List the content of cacerts | |
$ echo 'changeit' | keytool -list -v -keystore $(find $JAVA_HOME -name cacerts) | grep 'Owner:' | |
# List the content of a Keystore | |
$ keytool -list -v -keystore <keystore.jks> | |
# View Certificate Information | |
keytool -printcert -file <domain.crt> | |
# Generate Keys in New/Existing Keystore | |
$ keytool -genkeypair-alias <domain> -keyalg RSA -keystore <keystore.jks> | |
# Import Signed/Root/Intermediate Certificate | |
keytool -importcert -trustcacerts -file <domain.crt> -alias <domain> -keystore <keystore.jks> | |
# Change Keystore Password | |
keytool -storepasswd -keystore <keystore.jks> | |
# Rename Alias | |
keytool -changealias -alias <domain> -destalias <newdomain> -keystore <keystore.jks> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment