module documentation
Tests for twisted.internet._sslverify
.
Class |
|
Tests for twisted.internet._sslverify.OpenSSLAcceptableCiphers. |
Class |
|
ALPN protocol selection. |
Class |
|
Tests for sslverify._ChooseDiffieHellmanEllipticCurve . |
Class |
|
Tests for sslverify.optionsForClientTLS . |
Class |
|
No class docstring; 6/6 methods documented |
Class |
|
Undocumented |
Class |
|
Tests for deprecation of sslverify.OpenSSLCertificateOptions 's support of the pickle protocol. |
Class |
|
Tests for twisted.internet._sslverify.OpenSSLDHParameters. |
Class |
|
Tests for twisted.internet._sslverify._expandCipherString. |
Class |
|
A fake implementation of _ChooseDiffieHellmanEllipticCurve |
Class |
|
Introspectable fake of an OpenSSL.SSL.Context. |
Class |
|
An introspectable fake of pyOpenSSL's OpenSSL.crypto module. |
Class |
|
State for FakeCrypto |
Class |
|
Tests for FakeCrypto . |
Class |
|
An introspectable fake of cryptography's lib object. |
Class |
|
State for FakeLib |
Class |
|
Tests for FakeLib . |
Class |
|
Tests for sslverify.KeyPair . |
Class |
|
Test the behavior of the trustRootFromCertificates() API call. |
Class |
|
NPN/ALPN operations fail on platforms that do not support them. |
Class |
|
NPN and ALPN protocol selection. |
Class |
|
Tests for twisted.internet._sslverify.OpenSSLCipher. |
Class |
|
ECDH-related integration tests for OpenSSLOptions . |
Class |
|
Tests for sslverify.OpenSSLOptions . |
Class |
|
A mixin for OpenSSLOptions test cases creates client and server certificates, signs them with a CA, and provides a loopback that creates TLS a connections with them. |
Class |
|
Tests for _selectVerifyImplementation . |
Class |
|
Tests for the verification of the peer's service's identity via the hostname argument to sslverify.OpenSSLCertificateOptions . |
Class |
|
Tests for sslverify.OpenSSLCertificateOptions ' trustRoot argument, sslverify.platformTrust , and their interactions. |
Class |
|
Undocumented |
Function | certificates |
Create a self-signed CA certificate and server certificate signed by the CA. |
Function | counter |
Each time we're called, return the next integer in the natural numbers. |
Function | loopback |
Create a loopback TLS connection with the given trust and keys. |
Function | loopback |
Create a loopback TLS connection with the given trust and keys. Like loopbackTLSConnection , but using in-memory certificates and keys rather than writing them to disk. |
Function | make |
Undocumented |
Function | negotiate |
Create the TLS connection and negotiate a next protocol. |
Function | path |
Create a temporary file to store some serializable-as-PEM objects in, and return its name. |
Constant | A |
Undocumented |
Constant | A |
Undocumented |
Constant | A |
Undocumented |
Variable | ctx |
Undocumented |
Variable | skip |
Undocumented |
Variable | skip |
Undocumented |
Variable | skip |
Undocumented |
Variable | skip |
Undocumented |
Class | _ |
Undocumented |
Class | _ |
Undocumented |
Class | _ |
Undocumented |
Function | _loopback |
Common implementation code for both loopbackTLSConnection and loopbackTLSConnectionInMemory . Creates a loopback TLS connection using the provided server and client context factories. |
Create a self-signed CA certificate and server certificate signed by the CA.
Parameters | |
serviceunicode | The identity (hostname) of the server. |
Returns | |
tuple of (sslverify.Certificate , sslverify.PrivateCertificate ) | a 2-tuple of (certificate_authority_certificate, server_certificate) |
Create a loopback TLS connection with the given trust and keys.
Parameters | |
trustsslverify.IOpenSSLTrustRoot | the trustRoot argument for the client connection's context. |
privatestr (native string; file name) | The name of the file containing the private key. |
chainedstr (native string; file name) | The name of the chained certificate file. |
Returns | |
tuple | 3-tuple of server-protocol, client-protocol, and IOPump |
def loopbackTLSConnectionInMemory(trustRoot, privateKey, serverCertificate, clientProtocols=None, serverProtocols=None, clientOptions=None):
(source)
¶
Create a loopback TLS connection with the given trust and keys. Like loopbackTLSConnection
, but using in-memory certificates and keys rather than writing them to disk.
Parameters | |
trustsslverify.IOpenSSLTrustRoot | the trustRoot argument for the client connection's context. |
privatestr (native string) | The private key. |
server | The certificate used by the server. |
client | The protocols the client is willing to negotiate using NPN/ALPN. |
server | The protocols the server is willing to negotiate using NPN/ALPN. |
client | The type of OpenSSLCertificateOptions class to use for the client. Defaults to OpenSSLCertificateOptions. |
chainedstr (native string) | Undocumented |
Returns | |
tuple | 3-tuple of server-protocol, client-protocol, and IOPump |
Create the TLS connection and negotiate a next protocol.
Parameters | |
server | The protocols the server is willing to negotiate. |
client | The protocols the client is willing to negotiate. |
client | The type of OpenSSLCertificateOptions class to use for the client. Defaults to OpenSSLCertificateOptions. |
Returns | |
A tuple of the negotiated protocol and the reason the connection was lost. |
Create a temporary file to store some serializable-as-PEM objects in, and return its name.
Parameters | |
testtwisted.trial.unittest.TestCase | a test case to use for generating a temporary directory. |
*dumpables:tuple of object with dump method taking int returning bytes | arguments are objects from pyOpenSSL with a dump method, taking a pyOpenSSL file-type constant, such as OpenSSL.crypto.FILETYPE_PEM or OpenSSL.crypto.FILETYPE_ASN1 . |
Returns | |
str | the path to a file where all of the dumpables were dumped in PEM format. |
Undocumented
Value |
|
Undocumented
Value |
|
Common implementation code for both loopbackTLSConnection
and loopbackTLSConnectionInMemory
. Creates a loopback TLS connection using the provided server and client context factories.
Parameters | |
server | An OpenSSL context factory for the server. |
client | An OpenSSL context factory for the client. |
Returns | |
tuple | 5-tuple of server-tls-protocol, server-inner-protocol, client-tls-protocol, client-inner-protocol and IOPump |