-
Notifications
You must be signed in to change notification settings - Fork 20
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
Implement SSLContext.get_ca_certs() #90
Comments
Can you explain (like I'm 5) why this would be more complicated than calling the underlying import ssl
ctx = ssl.create_default_context()
ctx.get_ca_certs() I get a full list of certificates in my Windows trust store. If I do: import ssl
import truststore
truststore.inject_into_ssl()
ctx = ssl.create_default_context()
ctx._ctx.get_ca_certs() I get the same list. Why not pass through the |
@FaustinCarter In Windows, that works because the default SSL context loads the CA certs from the Windows trust store: https://github.com/python/cpython/blob/9cfb4e0d1ebf2900c19ee07697818c621f46cc3d/Lib/ssl.py#L532-L534 On my Mac, |
Wanted to also note that |
@sethmlarson I think this is true across platforms ( |
Thanks to you both. Very helpful discussion. It's a nice surprise to discover an instance where Windows "just works"! Usually it's the dreaded edge case that's too hard to solve! |
So if I understand this correctly:
So maybe a reasonable path forward is:
I guess one obvious open implementation question for 1 is: which store to pull from. By default, Windows pulls from ROOT and CA. It looks like there are a couple of options for getting certificates out of a
|
I suspect this will be possible in both macOS and Windows trust store APIs.
The text was updated successfully, but these errors were encountered: