Skip to content

Compatibility issues on Windows #41

@fwosar

Description

@fwosar

On Windows, any attempt to use the library will ultimately end up with a permission error. I tracked it down to the way you handle the certificate checks in case no bundles can be found (which you will not find on Windows, period). If you can't find a bundle, you ultimately end up writing out the root cert yourself using NamedTemporaryFile. However, NamedTemporaryFile does not work on Windows:

https://bugs.python.org/issue14243

My advice would be to simply bundle the cert as part of the Python package and read it from the class folder or alternatively disable automatic delete when using NamedTemporaryFile, make sure the file gets closed before being passed into wrap_socket, so that wrap_socket can actually open it, and then delete it yourself later when it is no longer needed. But IMHO the cleanest way is to simply get rid of any of that code and simply go with a bundled file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions