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/sh | |
if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then | |
echo "Usage: $0 private_key.p12 certificate.{p12, der}" | |
echo "You can export the private key (and certificate) in PKCS12 format from Keychain.app." | |
exit 0 | |
fi | |
# Create private key in PEM format from PKCS12 format without password. | |
openssl pkcs12 -in "$1" -nocerts -nodes -out _key.pem |