2

I'm running into a strange issue with httplib2 and python3, I have a little script to connect to my test server, I try to disable SSL verification but it still spits out the following:

  File "C:\Anaconda3\lib\site-packages\httplib2\__init__.py", line 987, in _conn_reque
    conn.connect()
  File "C:\Anaconda3\lib\http\client.py", line 1231, in connect
    server_hostname=server_hostname)
  File "C:\Anaconda3\lib\ssl.py", line 365, in wrap_socket
    _context=self)
  File "C:\Anaconda3\lib\ssl.py", line 583, in __init__
    self.do_handshake()
  File "C:\Anaconda3\lib\ssl.py", line 810, in do_handshake
    self._sslobj.do_handshake()
  ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed    (_ssl.c:600)

The code I'm using to connect:

    import httplib2
    url = 'https://www.MyTestServer.com/Test'
    h = httplib2.Http(".cache", disable_ssl_certificate_validation=True)
    h.add_credentials('username', 'password')
    resp, content = h.request(url, 'GET')
user3690467
  • 3,049
  • 6
  • 27
  • 54
  • I'm running into the same problem. The same code which works with SSL certificate disabling in Python 2 does not work in Python 3. I haven't dived into the httplib2 code too much, but it looks like there is a bug. – Craig S. Anderson Jan 11 '16 at 20:00

0 Answers0