Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadd a bootstrapping utility that makes the stdlib use certifi #108
Comments
|
IMO this is beyond the scope of certifi, which should be to do literally nothing but distribute a PEM file. |
Perhaps it should be a separate package that installs a I've updated the description to do this in a way that actually works - to my point about how subtle this is, setting the env var works in normal dynamically linked builds of python, but embedded builds (where this is more of an issue) might have accidentally initialized OpenSSL too early. |
There are a plethora of situations where you can end up with a Python whose stdlib doesn't point
SSL_CTX_set_default_verify_pathsat the right location for one reason or another. (Arguably, this is the reasoncertifiexists.)The relevant PEP tells you to do this:
"though highly discouraged".
It's pretty obscure to figure out that you need to know that the underlying function is actually documented here: https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html and not in the stdlib.
certifishould come with a function that does something like this:and then document it clearly so that anyone wanting a functioning stdlib TLS client layer will get it by default.