Skip to content

Proper initialization of system CAs on Windows #475

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

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Conversation

2hdddg
Copy link

@2hdddg 2hdddg commented Nov 13, 2020

Should use SSLContext.load_default_certs to load system CAs properly on
all platforms including Windows. SSLContext.set_default_verify_paths
worked fine on Linux based OSes. load_default_certs is new in Python
3.4.

Should use SSLContext.load_default_certs to load system CAs properly on
all platforms including Windows. SSLContext.set_default_verify_paths
worked fine on Linux based OSes. load_default_certs is new in Python
3.4.
@2hdddg 2hdddg requested a review from technige November 13, 2020 12:22
@@ -261,7 +261,10 @@ def get_ssl_context(self):
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE # https://docs.python.org/3.5/library/ssl.html#ssl.CERT_NONE

ssl_context.set_default_verify_paths() # https://docs.python.org/3.5/library/ssl.html#ssl.SSLContext.set_default_verify_paths
# Must be load_default_certs, not set_default_verify_paths to work
# on Windows with system CAs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, I was a bit annoyed over those references all over the code ;-) I mean finding info on standard python library functions isn't that hard to google

@2hdddg 2hdddg merged commit dc9c133 into 4.1 Nov 16, 2020
@2hdddg 2hdddg deleted the windows-system-cas branch November 16, 2020 11:40
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.

2 participants