如何把 Windows 的 IIS 網站的 SSL 憑證轉成 Tomcat 可以使用 SSL 憑證格式 1. 從 IIS 匯出 SSL 憑證交換檔,匯出格式為 . pfx 2. 使用 openssl 軟體將 SSL 憑證交換檔 . pfx 檔換為 憑證及金鑰轉的文字檔 指令如下: openssl pkcs12 -in myssl.pfx -out mysslkey.txt –nodes myssl.pfx :由 IIS 匯出之金鑰憑證交換檔 mysslkey.txt :將 myssl.pfx 轉換成文字檔輸出之檔案 3. 使用文書編輯軟體打開 mysslkey.txt 即可檢視內容 裡面包含 SSL 金鑰 和 SSL 憑證 4. 使用文書編輯軟體新增一個 ssl.txt 檔 並將憑證鏈及金鑰依序貼至 ssl.txt , 以 TWCA 為例,該公司的憑證鏈共四層, ssl.txt 檔由上至下依序為: 根憑證 (UTN -DATACorp SGC (root.cer)) 、 中繼憑證 (AddTrust External CA Root(uca_1.cer) 、 TWCA Secure Certification Authority(uca_2.cer)) 、 伺服器憑證 (server.cer) 及 伺服器金鑰 ( 於步驟 3 產生 ) 5. 使用 openssl 將 ssl.txt 轉換為 Tomcat 金鑰檔 指令如下: openssl pkcs12 -export -in ssl.txt-out tomcat.p12 -name keyname 6. 使用 Tomcat 的 keytool 檢視 Tomcat 金鑰檔內容 指令如下: keytool -v -list -keys...
留言