Skip to content

Instantly share code, notes, and snippets.

@jrk
Created October 20, 2009 18:16
Show Gist options
  • Save jrk/214476 to your computer and use it in GitHub Desktop.
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.
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