Skip to content

Add option to use platform default certificates for making HTTPS calls #10961

@notatallshaw

Description

@notatallshaw

What's the problem this feature will solve?

Specifically on Windows you can not get Pip to easily use the platforms Certificate Store for verifying the Certificate Authority. Other platforms are not as affected because it is possible to provide an environmental variable to point to a Certificate Store file, but Windows does not provide the Certificate Store as a file.

Particularly in organizations that use their own certificates for internal repositories this causes Pip to fail connecting.

Describe the solution you'd like

Since Python 3.4 the ssl module has provided a way to get the Platforms default cert store which on Windows will use the Certificate Store: https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_default_certs

Here is an example of how you get requests to use it: https://stackoverflow.com/a/50215614

Alternative Solutions

Keep as is

Additional context

Should reduce the number of use cases where --trusted-host is currently required.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions