Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SSL problem #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python3/httplib2/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def __init__(self, host, port=None, key_file=None, cert_file=None,
http.client.HTTPSConnection.__init__(
self, host, port=port, key_file=key_file,
cert_file=cert_file, timeout=timeout, context=context,
check_hostname=True)
check_hostname=disable_ssl_certificate_validation ^ True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to !disable_ssl_certificate_validation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what if disable_ssl_certificate_validation=None

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is False, so that means someone would have to have intentionally passed in None, which to me falls into the realm of a personal problem, I'd much rather have readable code.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides which I don't think that even works:
$ python3.2
Python 3.2.3 (default, Feb 27 2014, 21:31:18)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

None ^ True
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for ^: 'NoneType' and 'bool'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, reasonable. thx

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge this!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@superphil0 See #173, this patch is obsolete.



SCHEME_TO_CONNECTION = {
Expand Down