Go to the latest version of this document.

# ``twisted`.`web`.`client`.`_DeprecatedToCurrentPolicyForHTTPS``

class documentation

`class _DeprecatedToCurrentPolicyForHTTPS: (source)`

Constructor: `_DeprecatedToCurrentPolicyForHTTPS(webContextFactory)`

Implements interfaces: `twisted.web.iweb.IPolicyForHTTPS`

View In Hierarchy

Adapt a web context factory to a normal context factory.

Method | `__init__` | Wrap a web context factory in an `IPolicyForHTTPS`.
Method | `creatorForNetloc` | Called the wrapped web context factory's `getContext` method with a hostname and port number and return the resulting context object.
Instance Variable | `_webContextFactory` | An object providing a getContext method with `hostname` and `port` arguments.

def __init__(self, webContextFactory): (source)

Wrap a web context factory in an `IPolicyForHTTPS`.

Parameters
webContextFactory:`WebClientContextFactory` (or object with a similar `getContext` method). | An object providing a getContext method with `hostname` and `port` arguments.

def creatorForNetloc(self, hostname, port): (source)
from `twisted.web.iweb.IPolicyForHTTPS`

Called the wrapped web context factory's `getContext` method with a hostname and port number and return the resulting context object.

Parameters
hostname:`bytes` | The hostname part of the URI.
port:`int` | The port part of the URI.

Returns
`IOpenSSLContextFactory` | A context factory.

_webContextFactory: `WebClientContextFactory` (or object with a similar `getContext` method). = (source)

An object providing a getContext method with `hostname` and `port` arguments.