Skip to content

Instantly share code, notes, and snippets.

@kennonb
Created April 15, 2015 02:50
Show Gist options
  • Save kennonb/2f979ba1e5ad46060328 to your computer and use it in GitHub Desktop.
Save kennonb/2f979ba1e5ad46060328 to your computer and use it in GitHub Desktop.
Convert IIS .pfx to Apache .key
# Export the private key file from the pfx file
openssl pkcs12 -in filename.pfx -nocerts -out key.pem
# Export the certificate file from the pfx file
openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem
# This removes the passphrase from the private key so Apache won't
# prompt you for your passphase when it starts
openssl rsa -in key.pem -out server.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment