1

I'm trying to access a website with httplib library but i'm getting this error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

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

Because the certificate is self-signed. How can I disable the certificate verification?

Thanks!

Sorin Trimbitas
  • 1,467
  • 18
  • 35

1 Answers1

5

How do I have python httplib accept untrusted certs?

httplib.HTTPSConnection(hostname, timeout=5, context=ssl._create_unverified_context())
Community
  • 1
  • 1
Liyan Chang
  • 7,721
  • 3
  • 39
  • 59