Page MenuHomePhabricator

Family.ignore_certificate_error does not work in py3
Closed, DeclinedPublic

Description

py3 httplib2 (https://github.com/jcgregorio/httplib2/issues/173) has problems ignoring errors/not validating SSL certificates.

As a result, Family.ignore_certificate_error does not work in py3

File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1156, in request
  self.disable_ssl_certificate_validation)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 830, in __init__
  check_hostname=True)
File "/usr/lib64/python3.3/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


Version: core-(2.0)
Severity: minor
See Also:
https://github.com/jcgregorio/httplib2/issues/173
https://bugzilla.wikimedia.org/show_bug.cgi?id=72009
https://bugzilla.wikimedia.org/show_bug.cgi?id=72247

Details

Reference
bz72236

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:49 AM
bzimport set Reference to bz72236.
bzimport added a subscriber: Unknown Object (????).

I've submitted a pull request for an old patch floating around
https://github.com/jcgregorio/httplib2/pull/289

XZise claimed this task.
XZise subscribed.

With the switch to requests (T98439) it's possible to accept invalid certificates in Python 3 (except for the fact that it currently ignores the parameter).