原文:用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