class documentation

class Certificate(CertBase): (source)

Known subclasses: twisted.internet.ssl.PrivateCertificate

View In Hierarchy

An x509 certificate.

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

Inherited from CertBase:

Instance Variable original The underlying OpenSSL certificate object.
Method __init__ Undocumented
Method getSubject Retrieve the subject of this certificate.
Method __conform__ Convert this CertBase into a provider of the given interface.
Method _copyName Undocumented
def __repr__(self): (source)

Undocumented

ReturnsUndocumented (type: str)
def __eq__(self, other): (source)

Undocumented

ParametersotherUndocumented (type: object)
ReturnsUndocumented (type: bool)
@classmethod
def load(Class, requestData, format=crypto.FILETYPE_ASN1, args=()): (source)

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

ReturnsUndocumented (type: Class)
def dumpPEM(self): (source)

Dump this certificate to a PEM-format data string.

ReturnsUndocumented (type: str)
@classmethod
def loadPEM(Class, data): (source)

Load a certificate from a PEM-format data string.

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

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

ParametersClassUndocumented
transportan ISystemHandle provider
ReturnsUndocumented (type: Class)
RaisesCertificateErrorif the given transport does not have a peer certificate.
@classmethod
def hostFromTransport(Class, transport): (source)

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

ParametersClassUndocumented
transportan ISystemHandle provider; the transport we will
ReturnsUndocumented (type: Class)
RaisesCertificateErrorif the given transport does not have a host certificate.
def getPublicKey(self): (source)

Get the public key for this certificate.

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

Undocumented

def serialNumber(self): (source)

Retrieve the serial number of this certificate.

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

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

ParametersmethodOne of 'md5' or 'sha'.
ReturnsThe digest of the object, formatted as b":"-delimited hex pairs (type: bytes)
def _inspect(self): (source)

Undocumented

def inspect(self): (source)

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

def getIssuer(self): (source)

Retrieve the issuer of this certificate.

ReturnsA copy of the issuer of this certificate. (type: DistinguishedName)
def options(self, *authorities): (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 21.2.2 at 2021-07-28 08:52:54.