saltext.vmware.modules.ssl_adapter#
- class saltext.vmware.modules.ssl_adapter.HostHeaderSSLAdapter(pool_connections=10, pool_maxsize=10, max_retries=0, pool_block=False)[source]#
A HTTPS Adapter for Python Requests that sets the hostname for certificate verification based on the Host header.
This allows requesting the IP address directly via HTTPS without getting a “hostname doesn’t match” exception.
Example usage:
>>> s.mount('https://', HostHeaderSSLAdapter()) >>> s.get("https://93.184.216.34", headers={"Host": "example.org"})