我正在尝试使用httplib库访问网站,但我收到此错误:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:590)
c = httplib.HTTPSConnection('IP', 443)
c.request(method,url);
因为证书是自签名的。如何禁用证书验证?
谢谢!
答案 0 :(得分:5)
How do I have python httplib accept untrusted certs?
httplib.HTTPSConnection(hostname, timeout=5, context=ssl._create_unverified_context())