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.

Revisions

  1. kennonb created this gist Apr 15, 2015.
    9 changes: 9 additions & 0 deletions iis_pfx_to_apache_key.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # 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