證書報錯修復:fail ssl hand shake error

一、問題出現

使用微信小程序請求API網關時,可能提示“fail ssl hand shake error”。
具體表現爲使用PC端開發者工具請求不報錯、使用蘋果真機調試不報錯、只有使用安卓真機調試報錯。
證書報錯修復:fail ssl hand shake error

二、問題原因

證書鏈部署不完全導致,用戶只部署了域名證書而沒有部署服務器中間證書。可使用如下網站檢測。

證書檢測網站:
https://www.myssl.cn/tools/check-server-cert.html
證書報錯修復:fail ssl hand shake error

三、官方說明:

證書報錯修復:fail ssl hand shake error

四、解決方案:

1.打開SSL檢測網站,選擇PEM合成,將兩個選項打勾
證書報錯修復:fail ssl hand shake error

2.在服務器上,把KEY和CRT文件讀取出來

證書報錯修復:fail ssl hand shake error

證書報錯修復:fail ssl hand shake error

3.將信息分別複製到以下兩個框,重點:勾選自動添加中間證書。
然後就點擊合成PEM文件
證書報錯修復:fail ssl hand shake error

證書報錯修復:fail ssl hand shake error

4.將合成的PEM文件,放到服務器上,並設置nginx的算法和認證文件的路徑。
證書報錯修復:fail ssl hand shake error

5.重加載nginx服務之後,重新檢測域名證書

證書報錯修復:fail ssl hand shake error

證書報錯修復:fail ssl hand shake error

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章