憑證格式 .pfx 轉 .pem: http://support.citrix.com/article/ctx106028
安裝 OpenSSL for Win32 http://slproweb.com/products/Win32OpenSSL.html
要先裝 Visual C++ 2008 Redistributables (搭配 Win32OpenSSL 或 Win64OpenSSL)
Microsoft Visual C++ 2008 Redistributable Package (x86) http://www.microsoft.com/en-us/download/confirmation.aspx?id=29
Microsoft Visual C++ 2008 Redistributable Package (x64) http://www.microsoft.com/en-us/download/details.aspx?id=15336
以下是轉換操作步驟
安裝完到: C:\OpenSSL-Win32\bin> 下指令
set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
openssl pkcs12 -in "D:\Source.pfx" -passin pass:憑證的密碼 -out D:\Target1.pem -nodes
openssl pkcs12 -in "D:\Source.pfx" -passin pass:憑證的密碼 -nodes | openssl rsa -out "D:\Target2.pem"
再把 Target2.pem 內的
-----BEGIN RSA PRIVATE KEY----- 到 -----END RSA PRIVATE KEY-----
複製取代 Target1.pem 內的
-----BEGIN PRIVATE KEY----- 到 -----END PRIVATE KEY-----
Target1.pem 就是正確的憑證了
沒有留言:
張貼留言