Skip to main content

ssl_utils

Utilities/patches for working with non-standard SSL configurations.

Adds the ability to work with trusted root CAs that are stored in the system truststore.

note

In order for some of these patches to work properly, they must be made BEFORE imports of requests, urllib3, etc., happen.

Module

Functions

inject_ssl_proxy_support

def inject_ssl_proxy_support()> None:

Injects support for HTTPS proxy connections with custom SSL certificates.

Proxies that handle HTTPS connections will normally require the proxy's root CA to be added as a trusted CA so that it can handle the wrapping/unwrapping of SSL connections.

This function utilises the system truststores to add this support into Python's various HTTP(S) connection capabilities so that Bitfount can be used transparently from behind a corporate proxy.

note

The proxy details must still be provided to Python in some cases where it can't automatically detect the proxy from the system. The HTTP_PROXY and HTTPS_PROXY environment variables can be used to supply the details to the Python process.