Created
May 5, 2021 18:50
-
-
Save Zellius/a8f993cf8805170cd11aaf8ee9aa3d30 to your computer and use it in GitHub Desktop.
Import a single keystore key to another one
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 a new keystore | |
keytool -genkey -alias alias_name -keystore new_keystore.jks | |
keytool -delete -alias alias_name -keystore new_keystore.jks | |
# Import 'alias_to_import' from 'old_keystore.jks' to the 'new_keystore.jks' as 'new_alies' | |
keytool -importkeystore -srckeystore old_keystore.jks -destkeystore new_keystore.jks -srcstoretype jks -deststoretype jks -srcalias alias_to_import -destalias new_alies | |
# You can compare certificates SHA fingerprint | |
keytool -list -v -keystore new_keystore.jks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment