This is made hugely complicated and twisted.
First off, there are two ways to obtain a signed SSL certificate. One is like StartSSL do it – you verfify your domain ownership by following a link sent in a mail to e.g. hostmaster@domain and then you get both your certificate (a signed public key) or you send a CSR key and then you obtain your signed certificate. The latter one seems to be the more common.
The problem with Windows/Exchange/IIS here seems to be that it does all it can to hide you private key from you. The only way to obtain it is with a .pfx file (personal information exchange).
Here are the steps to obtain a signed certicate using a CSR with Windows Server 2008 and Exchange 2008.
- DigiCert have a handy tool to simplyfy this process: https://www.digicert.com/easy-csr/exchange2007.htm
- Open “Exchange management shell” and paste the command the DigiCert tool gave you. This will place a .csr file in the root of your C: drive.
- Get yourself a certificate.
- Now we need to import the certificate (the signed public key) into the depths of Windows. Open up the “Exchange management shell” again and write:
Import-ExchangeCertificate -Path C:\path-to-certificate.cer - Enable-ExchangeCertificate -Thumbprint <thumbprint> -Services IIS
Now should Windows/IIS/Exchange be aware of the certificate (the public key should now be signed). This means that you can now use it for you OWA. If you are getting errors about a missing private key, read below. - Open “IIS Manager” and select your server, then open “Server Certificates”. Now you should see your new certificate there. If you want to export it, you can export it here as a .pfx file.
- In order to make OWA use your new certificate go to:
Sites -> Default Web Site -> Click “Bindings” in the “Actions” tab on the right. - Choose HTTPS and click on Edit.
- Choose the certificate. Exchange as probably labelled it “Microsoft Exchange” for you. Click on “View certificate” too check. Use the thumbprint to verify it. Click OK.
- Restart IIS: cmd -> IISReset
- All done!
If you are getting errors about “missing private key”:
- Open MMC and add a “Certificates” snap-in.
- Choose “computer account”
- If you don’t see your certificate there (mine did since i managed to use Import-ExchangeCertificate) you might have to import it: Right click on Personal and choose All tasks -> Import.
- Certificate Store: Personal
- Double-click on the cert and go to the “Details” tab. Find “Serial Number” and jot it down.
- Start -> Run -> cmd
- certutil -repairstore my <insert Serial Number here>
Also, If you have come to hate Windows/IIS/Exchange – fear not, you are not alone!
Any hints on where the actual private key resides are welcome.
Comment (1)
This helped me a lot, thanks! working now for postur.mss.is