gpt4 book ai didi

python - httplib.HTTPSConnection 问题 : CERTIFICATE_VERIFY_FAILED

转载 作者:太空宇宙 更新时间:2023-11-04 08:46:40 33 4
gpt4 key购买 nike

我正在尝试使用 httplib 库访问网站,但出现此错误:[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败 (_ssl.c:590)

c = httplib.HTTPSConnection('IP', 443)
c.request(method,url);

因为证书是自签名的。如何禁用证书验证?

谢谢!

最佳答案

How do I have python httplib accept untrusted certs?

httplib.HTTPSConnection(hostname, timeout=5, context=ssl._create_unverified_context())

关于python - httplib.HTTPSConnection 问题 : CERTIFICATE_VERIFY_FAILED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39945702/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com