import warnings from threading import RLock as _RLock from OpenSSL import SSL as _ssl warnings.warn( "OpenSSL.tsafe is deprecated and will be removed", DeprecationWarning, stacklevel=3 ) class Connection: def __init__(self, *args): self._ssl_conn = _ssl.Connection(*args) self._lock = _RLock() for f in ('get_context', 'pending', 'send', 'write', 'recv', 'read', 'renegotiate', 'bind', 'listen', 'connect', 'accept', 'setblocking', 'fileno', 'shutdown', 'close', 'get_cipher_list', 'getpeername', 'getsockname', 'getsockopt', 'setsockopt', 'makefile', 'get_app_data', 'set_app_data', 'state_string', 'sock_shutdown', 'get_peer_certificate', 'get_peer_cert_chain', 'want_read', 'want_write', 'set_connect_state', 'set_accept_state', 'connect_ex', 'sendall'): exec("""def %s(self, *args): self._lock.acquire() try: return self._ssl_conn.%s(*args) finally: self._lock.release()\n""" % (f, f))
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
SSL.py | File | 86.88 KB | 0644 |
|
__init__.py | File | 447 B | 0644 |
|
_util.py | File | 4.08 KB | 0644 |
|
crypto.py | File | 98.14 KB | 0644 |
|
debug.py | File | 1.02 KB | 0644 |
|
rand.py | File | 1.02 KB | 0644 |
|
tsafe.py | File | 1.08 KB | 0644 |
|
version.py | File | 626 B | 0644 |
|