API-compatibility wrapper for Python's OpenSSL wrapped socket object. Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage collector of PyPy.
Method | __init__ |
Undocumented |
Method | close |
Undocumented |
Method | fileno |
Undocumented |
Method | getpeercert |
Undocumented |
Method | gettimeout |
Undocumented |
Method | handshake |
Actually performs the TLS handshake. This is run automatically by wrapped socket, and shouldn't be needed in user code. |
Method | recv |
Undocumented |
Method | recv |
Undocumented |
Method | send |
Undocumented |
Method | sendall |
Undocumented |
Method | settimeout |
Undocumented |
Method | shutdown |
Undocumented |
Method | version |
Undocumented |
Instance Variable | context |
Undocumented |
Instance Variable | socket |
Undocumented |
Method | _custom |
Called when we have set custom validation. We do this in two cases: first, when cert validation is entirely disabled; and second, when using a custom trust DB. Raises an SSLError if the connection is not trusted. |
Method | _decref |
Undocumented |
Method | _drop |
Undocumented |
Method | _evaluate |
Undocumented |
Method | _raise |
A context manager that can be used to wrap calls that do I/O from SecureTransport. If any of the I/O callbacks hit an exception, this context manager will correctly propagate the exception after the fact... |
Method | _reuse |
Undocumented |
Method | _set |
Sets up the ALPN protocols on the context. |
Method | _set |
Sets up the allowed ciphers. By default this matches the set in util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done custom and doesn't allow changing at this time, mostly because parsing OpenSSL cipher strings is going to be a freaking nightmare. |
Instance Variable | _client |
Undocumented |
Instance Variable | _closed |
Undocumented |
Instance Variable | _exception |
Undocumented |
Instance Variable | _keychain |
Undocumented |
Instance Variable | _keychain |
Undocumented |
Instance Variable | _makefile |
Undocumented |
Instance Variable | _timeout |
Undocumented |
Actually performs the TLS handshake. This is run automatically by wrapped socket, and shouldn't be needed in user code.
Called when we have set custom validation. We do this in two cases: first, when cert validation is entirely disabled; and second, when using a custom trust DB. Raises an SSLError if the connection is not trusted.
A context manager that can be used to wrap calls that do I/O from SecureTransport. If any of the I/O callbacks hit an exception, this context manager will correctly propagate the exception after the fact. This avoids silently swallowing those exceptions. It also correctly forces the socket closed.