How to create pfx (PKCS12) file using openssl

If you have a certificate file and private key and need to move that to a Windows server you can easily create a pfx file that can be imported on the Windows server.

Here’s how:

openssl pkcs12 -export -in {cer_filename}.cer -inkey {key_filename}.key -out {pfx_filename}.pfx

You will be asked to provide a password. You’ll need to use this password when you import the certificate on the Windows server.

How to migrate multiple sites from IIS 6 to IIS 7

This is a quick guide on how to migrate all sites from IIS 6 to IIS 7. You can probably use the same commands to move sites from one IIS 7 to another.

Everything will be migrated, including application pools, virtual directories, SSL certficiates etc.

1. Download and install Web Deployment Tool on both source and destination servers: Continue reading

Generating self-signed certificate

1. Download and install Windows SDK

2. Open command prompt as Administrator and cd to this directory: C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin

2. Create a root certificate

makecert -pe -n "CN=Test Root Authority" -ss my -sr LocalMachine -a sha1 -sky signature -r "c:\Test Root Authority.cer"

3. Create the new certificate and sign it with the newly generated self-signed root certificate

makecert -pe -n "" -ss my -sr LocalMachine -a sha1 -sky exchange -eku -in "Test Root Authority" -is my -ir LocalMachine -sp "Microsoft RSA Schannel Cryptographic Provider" -sy 12 c:\yourdomain.cer