Skip to content

Conversation

@gcd0318
Copy link

@gcd0318 gcd0318 commented Jun 11, 2014

fix issue 173. originated by kvvier(https://code.google.com/u/kvvier/) and verified for python3.3 (win) by (https://code.google.com/u/111191101025126589579/), and me for python3.4 (linux)

As the modification of !disable_ssl_certificate_validation, I got following error when I try to install:
byte-compiling build/bdist.linux-armv7l/egg/httplib2/init.py to init.cpython-34.pyc
File "build/bdist.linux-armv7l/egg/httplib2/init.py", line 829
check_hostname=!disable_ssl_certificate_validation)
^
SyntaxError: invalid syntax

So I suggest the change kvvier

@FichteFoll
Copy link

I get this error on Python3.3:

Traceback (most recent call last):
  File "lsftest.py", line 13, in <module>
    header, contents = h.request(url)
  File "C:\Python33\lib\site-packages\httplib2\__init__.py", line 1174, in request
    self.disable_ssl_certificate_validation)
  File "C:\Python33\lib\site-packages\httplib2\__init__.py", line 829, in __init__
    check_hostname=True)
  File "C:\Python33\lib\http\client.py", line 1183, in __init__
    raise ValueError("check_hostname needs a SSL context with "
ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED

(stripped) code:

h = httplib2.Http(".cache", disable_ssl_certificate_validation=True)
header, contents = h.request("https://...")

So suppose line 229 has to be:

check_hostname=ssl.CERT_OPTIONAL if disable_ssl_certificate_validation else ssl.CERT_REQUIRED)

@maweki
Copy link

maweki commented Mar 12, 2015

Is there any chance that we get a fix for that issue merged?

@jayvdb
Copy link

jayvdb commented Apr 28, 2015

There is also #289 , which attributes the original author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants