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`.`KeyPair``

class documentation

`class KeyPair(PublicKey): (source)`

Constructor: `KeyPair(osslpkey)`

View In Hierarchy

Undocumented

Class Method | `generate` | Undocumented
Class Method | `load` | Undocumented
Method | `__getstate__` | Undocumented
Method | `__setstate__` | Undocumented
Method | `certificateRequest` | Create a certificate request signed with this key.
Method | `dump` | Undocumented
Method | `inspect` | Undocumented
Method | `newCertificate` | Undocumented
Method | `requestObject` | Undocumented
Method | `selfSignedCert` | Undocumented
Method | `signCertificateRequest` | Given a blob of certificate request data and a certificate authority's DistinguishedName, return a blob of signed certificate data.
Method | `signRequestObject` | Sign a CertificateRequest instance, returning a Certificate instance.

Inherited from `PublicKey`:

Method | `__init__` | No summary
Method | `__repr__` | Undocumented
Method | `keyHash` | Compute a hash of the underlying PKey object.
Method | `matches` | Does this `PublicKey` contain the same value as another `PublicKey`?
Instance Variable | `original` | The original private key.

@classmethod
def generate(Class, kind=crypto.TYPE_RSA, size=2048): (source)

Undocumented

@classmethod
def load(Class, data, format=crypto.FILETYPE_ASN1): (source)

Undocumented

@deprecated(Version('Twisted', 15, 0, 0), 'a real persistence system')
def __getstate__(self): (source)

Deprecated since version 15.0.0: `__getstate__` was deprecated in Twisted 15.0.0; please use `a real persistence system` instead.

Undocumented

@deprecated(Version('Twisted', 15, 0, 0), 'a real persistence system')
def __setstate__(self, state): (source)

Deprecated since version 15.0.0: `__setstate__` was deprecated in Twisted 15.0.0; please use `a real persistence system` instead.

Undocumented

def certificateRequest(self, distinguishedName, format=crypto.FILETYPE_ASN1, digestAlgorithm='sha256'): (source)

Create a certificate request signed with this key.

Returns
a string, formatted according to the 'format' argument.

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

Undocumented

def inspect(self): (source)
overrides `twisted.internet._sslverify.PublicKey.inspect`

Undocumented

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

Undocumented

def requestObject(self, distinguishedName, digestAlgorithm='sha256'): (source)

Undocumented

def selfSignedCert(self, serialNumber, **kw): (source)

Undocumented

def signCertificateRequest(self, issuerDistinguishedName, requestData, verifyDNCallback, serialNumber, requestFormat=crypto.FILETYPE_ASN1, certificateFormat=crypto.FILETYPE_ASN1, secondsToExpiry=60*60*24*365, digestAlgorithm='sha256'): (source)

Given a blob of certificate request data and a certificate authority's DistinguishedName, return a blob of signed certificate data.

If verifyDNCallback returns a Deferred, I will return a Deferred which fires the data when that Deferred has completed.

def signRequestObject(self, issuerDistinguishedName, requestObject, serialNumber, secondsToExpiry=60*60*24*365, digestAlgorithm='sha256'): (source)

Sign a CertificateRequest instance, returning a Certificate instance.