poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Automatically detect local certificates

Open bollard opened this issue 2 years ago • 1 comments

Specifying the REQUESTS_CA_BUNDLE is a useful way to include self signed certificates for non-Windows platforms, however on Windows things are a bit trickier. This change proposes to use create_default_context() (which in turn calls, load_default_certs() from the Python SSL library to include the required certificates for us.

For background, I'm on a Windows machine in a corporate environment trying (and otherwise failing) to poetry publish to an internal Artifactory repo. All credit to this Stack Overflow answer for the code.

Thanks

First time contributing - will have a look at tests and docs over the weekend to get myself more familiar. Hope that's alright.

Pull Request Check List

Resolves: #issue-number-here

  • [ ] Added tests for changed code.
  • [ ] Updated documentation for changed code.

bollard avatar Apr 22 '22 12:04 bollard

Something that should probably be mentioned is whether you tried python-certifi-win32 or not.

Darsstar avatar Apr 24 '22 16:04 Darsstar