Go to the latest version of this document.

# ``twisted`.`internet`.`ssl`.`AcceptableCiphers``

class documentation

`class AcceptableCiphers: (source)`

Constructor: `AcceptableCiphers(ciphers)`

Implements interfaces: `twisted.internet.interfaces.IAcceptableCiphers`

View In Hierarchy

A representation of ciphers that are acceptable for TLS connections.

Class Method | `fromOpenSSLCipherString` | Create a new instance using an OpenSSL cipher string.
Method | `__init__` | Undocumented
Method | `selectCiphers` | Choose which ciphers to allow to be negotiated on a TLS connection.
Instance Variable | `_ciphers` | Undocumented

@classmethod
def fromOpenSSLCipherString(cls, cipherString): (source)

Create a new instance using an OpenSSL cipher string.

Parameters
cipherString:`unicode` | An OpenSSL cipher string that describes what cipher suites are acceptable. See the documentation of OpenSSL or Apache for details.

Returns
`twisted.internet.ssl.AcceptableCiphers` | Instance representing `cipherString`.

def __init__(self, ciphers): (source)

Undocumented

def selectCiphers(self, availableCiphers): (source)
from `twisted.internet.interfaces.IAcceptableCiphers`

Choose which ciphers to allow to be negotiated on a TLS connection.

Parameters
availableCiphers | A `tuple` of `ICipher` which gives the names of all ciphers supported by the TLS implementation in use.

Returns
A `tuple` of `ICipher` which represents the ciphers which may be negotiated on the TLS connection. The result is ordered by preference with more preferred ciphers appearing earlier.

_ciphers = (source)

Undocumented