Httpclient https请求出现Certificates does not conform 解决方法

来源:互联网 发布:js internal 编辑:程序博客网 时间:2024/06/16 03:29

爬虫开发的时候,用Httpclient https请求的时候,由于需要证书验证,经常会出现java.security.cert.CertificateException: Certificates does not conform to algorithm constraints的错误,解决方法如下:


找到jdk的安装目录:

编辑 jre/lib/security/目录下的java.security文件,将文件里面所有jdk.certpath.disabledAlgorithms=xxx,等号右边的内容全部去掉,然后保持,就可以了~


阅读全文
0 0
原创粉丝点击