原文:用HttpClient發送HTTPS請求報SSLException: Certificate for <域名> doesn't match any of the subject alternative names問題的解決

最近用server醬 PushBear做消息自動推送,用apache HttpClient做https的get請求,但是代碼上到服務器端就報javax.net.ssl.SSLException: Certificate for lt 域名 gt doesn t match any of the subject alternative names: 域名 ,仔細翻了一下文檔發現是HttpClient ...

2019-02-25 10:58 0 5251 推薦指數:

查看詳情

自簽證書 doesn't match any of the subject alternative names

出現這個的原因是https中的域名或者IP,與證書中登記的不一致。 如果是自簽證書的話,可以根據具體需要重新生成證書。 還有一種解決方案是在java中跳過這個檢查。 繞過檢查分兩類,一個是繞過證書在CA備案的檢查,一個是繞過url和證書中記錄IP或域名的檢查 未完待續。。。 ...

Thu Dec 27 00:03:00 CST 2018 0 1965
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM