crossbar.common.twisted.tlsctx

Attributes

Classes

TlsClientContextFactory

A context factory for SSL clients.

TlsServerContextFactory

TLS context factory for use with Twisted.

Module Contents

ECDH_DEFAULT_CURVE[source]
ECDH_DEFAULT_CURVE_NAME = 'prime256v1'[source]
ELLIPTIC_CURVES[source]
SSL_DEFAULT_CIPHERS = 'ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA...[source]
SSL_DEFAULT_OPTIONS[source]
class TlsClientContextFactory[source]

Bases: twisted.internet.ssl.ClientContextFactory

A context factory for SSL clients.

class TlsServerContextFactory(privateKeyString, certificateString, chainedCertificate=True, dhParamFilename=None, ciphers=None, ca_certs=[])[source]

Bases: twisted.internet.ssl.DefaultOpenSSLContextFactory

TLS context factory for use with Twisted.

Like the default

but loads key/cert from string, not file and supports chained certificates.

Chained certificates:

The certificates must be in PEM format and must be sorted starting with the subject’s certificate (actual client or server certificate), followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA.

Hardening:

http://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ https://www.ssllabs.com/ssltest/analyze.html?d=www.example.com

_ca_certs = [][source]
_certificateString = b''[source]
_chainedCertificate = True[source]
_ciphers = None[source]
_contextFactory[source]
_dhParamFilename = None[source]
_privateKeyString = b''[source]
_verify_peer(conn, cert, errno, depth, preverify_ok)[source]
cacheContext()[source]
log[source]
sslmethod = 3[source]