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

Override SSLContext._load_windows_store_certs with a no-op #22

Open
davisagli opened this issue Mar 14, 2022 · 2 comments
Open

Override SSLContext._load_windows_store_certs with a no-op #22

davisagli opened this issue Mar 14, 2022 · 2 comments

Comments

@davisagli
Copy link
Collaborator

SSLContext has a _load_windows_store_certs method which is called by SSLContext.load_default_certs to load CA certs on Windows. We could replace it with a method that does nothing to avoid unnecessary work.

@sethmlarson
Copy link
Owner

Since the long term goal is to integrate this functionality into CPython's SSLContext I was thinking changing load_default_certs to basically have a flag that says "we want system certs" and if set we use the certificate verification implemented in truststore otherwise we use the normal SSLContext flow. This is compatible with the "use system certificates and these additional certificates" flow too.

What are your thoughts on this?

@davisagli
Copy link
Collaborator Author

At a high level that makes sense. We'll need to think carefully about how to name it to avoid confusion. Because load_default_certs is kind of already a way to say "we want system certs," except that of course it doesn't work on Mac and it doesn't switch away from using OpenSSL as the way to verify the certs that have been loaded. I don't have a specific proposal yet but it seems like we want something that's more about what system to use for verification, rather than "where the CA certs come from" (though that's probably the mental model that most users have about what needs to be fixed).

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

No branches or pull requests

2 participants