Created
June 10, 2015 06:28
-
-
Save WanghongLin/c2d6ddce4d6ce09af458 to your computer and use it in GitHub Desktop.
import key pair
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
#!/bin/bash | |
storepass= | |
keypass= | |
key_alias=platform | |
openssl pkcs8 -inform DER -nocrypt -in platform.pk8 | \ | |
openssl pkcs12 -export -in platform.x509.pem -inkey /dev/stdin \ | |
-name $key_alias -password pass:$keypass -out tmp.p12 | |
keytool -importkeystore -deststorepass $storepass -srckeystore tmp.p12 \ | |
-srcstoretype PKCS12 -srcstorepass $keypass -destkeystore ${key_alias}.keystore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment