Created
October 20, 2009 18:16
-
-
Save jrk/214476 to your computer and use it in GitHub Desktop.
Convert a p12 certificate export to raw OpenSSL pem format, including private key and certificate.
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
function p12topem { | |
# Convert a p12 certificate export to raw OpenSSL pem format, including | |
# private key and certificate. | |
# via http://www.gridsite.org/wiki/Convert_p12 | |
openssl pkcs12 -in "$1" -nodes -out "$2" | |
# Make it readable only by you: | |
chmod 0400 "$2" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment