Baltimore Squirrels

here squirrely, squirrely

Apache 2 SSL Certificate Export for IIS

When it comes to IIS (and pretty much anything on Windows) I know very, very little. This is mostly by design as it lends itself to much more plausible deniability when someone needs help fixing their computer.

Despite my efforts, I still have to interact with Windows on occasion. This week started out with one of those little interactions when I discovered I had to provide our network guys with an SSL certificate that I have been using in Linux for the past year. IIS didn’t seem to know what to do with the files I was using in Apache, and while Googling around helped a bit, I had to do some tweaking to get the magic command, which I will now document here for the sake of the hive mind:

openssl pkcs12 -export -out my_exported_cert.pfx -in my_cert.crt -inkey my_key.key -name 'My Certificate'

Where my_exported_cert.pfx is the file that IIS will be able to use, my_cert.crt is the certificate that Apache is using (SSLCertificateFile in Apache 2) and my_key.key is your key (SSLCertificateKeyFile in Apache 2).I’d tell you how to use the pfx file in IIS, but that part of this task wasn’t my job to complete.

Written by Tom

September 18th, 2007 at 11:13 am

Posted in Geekery, Ramblings