编程语言
首页 > 编程语言> > URLConnection(java.net.URLConnection)请求不信任或配置错误的https站点

URLConnection(java.net.URLConnection)请求不信任或配置错误的https站点

作者:互联网

有时可能通过URLConnection写了个爬虫收集网站信息,请求https的url时,可能预到javax.net.ssl.SSLException: Not trusted server certificate 、java.security.cert.CertificateException: No subject alternative DNS name matching [hostname] found或javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name这几种异常。本文主要介绍针对这几种异常解决方法。
原文地址:URLConnection(java.net.URLConnection)请求不信任或配置错误的https站点

标签:URLConnection,java,ssl,https,net,javax
来源: https://blog.csdn.net/weixin_42098295/article/details/117090432