SSL轉換成微軟用IIS的

要將SSL憑證證書轉換成IIS用的。我收到的憑證據說是從godaddy來的

但是依著godaddy官方操作。但是有些地方怪怪的。

官方操作文件在這邊
https://tw.godaddy.com/help/microsoftr-iis-8-ssl-4951

實際上操作的經驗是不保證能成功,是有機會成功的。

煎熬了之後記錄下我的解決方法

把以下複製貼上讓他成為一個BAT檔案,跟SSL檔案放在同一個目錄後,再用BAT檔去轉換解決

echo off

:: download OpenSSL if you don't have it for the below

:: Conver the p7b into PEM format
openssl pkcs7 -in ssl.p7b -print_certs -out ssl.pem

:: Combine this with the crt server certificate and private key into a PFX
openssl pkcs12 -export -in ssl.crt -inkey ssl.key -certfile ssl.pem -out ssl.pfx