Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`internet`.`ssl`.`Certificate``

class documentation

`class Certificate(CertBase): (source)`

Known subclasses: `twisted.internet.ssl.PrivateCertificate`

View In Hierarchy

An x509 certificate.

Class Method | `hostFromTransport` | Get the certificate for the local end of the given transport.
Class Method | `load` | Load a certificate from an ASN.1- or PEM-format string.
Class Method | `loadPEM` | Load a certificate from a PEM-format data string.
Class Method | `peerFromTransport` | Get the certificate for the remote end of the given transport.
Method | `__eq__` | Undocumented
Method | `__repr__` | Undocumented
Method | `digest` | Return a digest hash of this certificate using the specified hash algorithm.
Method | `dump` | Undocumented
Method | `dumpPEM` | Dump this certificate to a PEM-format data string.
Method | `getIssuer` | Retrieve the issuer of this certificate.
Method | `getPublicKey` | Get the public key for this certificate.
Method | `inspect` | Return a multi-line, human-readable representation of this Certificate, including information about the subject, issuer, and public key.
Method | `options` | Undocumented
Method | `serialNumber` | Retrieve the serial number of this certificate.
Method | `_inspect` | Undocumented

Inherited from `CertBase`:

Method | `__conform__` | Convert this `CertBase` into a provider of the given interface.
Method | `__init__` | Undocumented
Method | `getSubject` | Retrieve the subject of this certificate.
Instance Variable | `original` | The underlying OpenSSL certificate object.
Method | `_copyName` | Undocumented

@classmethod
def hostFromTransport(Class, transport): (source)

Get the certificate for the local end of the given transport.

Parameters
Class | Undocumented
transport | an `ISystemHandle` provider; the transport we will
Returns
`Class` | Undocumented
Raises
`CertificateError` | if the given transport does not have a host certificate.

@classmethod
def load(Class, requestData, format=crypto.FILETYPE_ASN1, args=()): (source)
overridden in `twisted.internet.ssl.PrivateCertificate`

Load a certificate from an ASN.1- or PEM-format string.

Returns
`Class` | Undocumented

@classmethod
def loadPEM(Class, data): (source)
overridden in `twisted.internet.ssl.PrivateCertificate`

Load a certificate from a PEM-format data string.

Returns
`Class` | Undocumented

@classmethod
def peerFromTransport(Class, transport): (source)

Get the certificate for the remote end of the given transport.

Parameters
Class | Undocumented
transport | an `ISystemHandle` provider
Returns
`Class` | Undocumented
Raises
`CertificateError` | if the given transport does not have a peer certificate.

def __eq__(self, other): (source)

Undocumented

Parameters
other:`object` | Undocumented
Returns
`bool` | Undocumented

def __repr__(self): (source)
overridden in `twisted.internet.ssl.PrivateCertificate`

Undocumented

Returns
`str` | Undocumented

def digest(self, method='md5'): (source)

Return a digest hash of this certificate using the specified hash algorithm.

Parameters
method | One of `'md5'` or `'sha'`.
Returns
`bytes` | The digest of the object, formatted as b":"-delimited hex pairs

def dump(self, format=crypto.FILETYPE_ASN1): (source)

Undocumented

def dumpPEM(self): (source)
overridden in `twisted.internet.ssl.PrivateCertificate`

Dump this certificate to a PEM-format data string.

Returns
`str` | Undocumented

def getIssuer(self): (source)

Retrieve the issuer of this certificate.

Returns
`DistinguishedName` | A copy of the issuer of this certificate.

def getPublicKey(self): (source)

Get the public key for this certificate.

Returns
`PublicKey` | Undocumented

def inspect(self): (source)
overridden in `twisted.internet.ssl.PrivateCertificate`

Return a multi-line, human-readable representation of this Certificate, including information about the subject, issuer, and public key.

def options(self, *authorities): (source)
overridden in `twisted.internet.ssl.PrivateCertificate`

Undocumented

def serialNumber(self): (source)

Retrieve the serial number of this certificate.

Returns
`int` | Undocumented

def _inspect(self): (source)

Undocumented