查看SSL是否設定正確




今天處理到一個SSL案例記錄下來,原本以為自己的設定沒錯,從網站上看也沒錯都有鎖頭標誌,但是其他廠商仍然反應有問題.

後來使用FB的分享偵錯工具查看 https://developers.facebook.com/tools/debug/sharing 還真的有問題,SSL部分顯示了這樣的錯誤訊息.

SSL Error
Can’t validate SSL Certificate. Either it is self-signed (which will cause browser warnings) or it is invalid.

經過查證,後來找到了https://whatsmychaincert.com/ 並把網址貼上去,確實沒有設定正確.後來看指示才搞定這些過程.

產出後的東西可以用這個對一下md5之後對不對

openssl x509 -noout -modulus -in test.crt | openssl md5

openssl rsa -noout -modulus -in test.key | openssl md5

後來研究了一下,基本上是給過來的東西還要自己處理一次,也就是將伺服器憑證及中繼憑證合併為一個檔: domain.crt + bundle.crt = ssl.crt