ssl — TLS/SSL wrapper for socket objects — Python 3.14.7 documentation

docs.python.org

Tin mới

socket — Low-level networking interface

select — Waiting for I/O completion

Python Module Index

3.14.7 Documentation

The Python Standard Library

Networking and Interprocess Communication

Functions, constants, and exceptions¶

This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the Op

Requirements for optional modules

This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the Op

WebAssembly platforms

This module does not work or is not available on WebAssembly. See WebAssembly platforms for more information.

NotImplementedError

Only available with OpenSSL 1.1.1 and TLS 1.3 enabled. Without TLS 1.3 support, the method raises NotImplementedError.

selectors: High-level I/O multiplexing.

Conversely, since the SSL layer has its own framing, a SSL socket may still have data available for reading without select() being aware of it. Therefore, you should first call SSLSocket.recv() to drain any potentially a

asyncio: Asynchronous I/O.

The asyncio module supports non-blocking SSL sockets and provides a higher level Streams API. It polls for events using the selectors module and handles SSLWantWriteError, SSLWantReadError and BlockingIOError exceptions.

multiprocessing: Process-based parallelism.

If using this module as part of a multi-processed application (using, for example the multiprocessing or concurrent.futures modules), be aware that OpenSSL’s internal random number generator does not properly handle fork

concurrent.futures

If using this module as part of a multi-processed application (using, for example the multiprocessing or concurrent.futures modules), be aware that OpenSSL’s internal random number generator does not properly handle fork