ssl module provides SSL contexts to wrap sockets in.
create_default_context() → ssl.SSLContext¶
Return the default SSLContext.
Settings related to SSL that can be applied to a socket by wrapping it. This is useful to provide SSL certificates to specific connections rather than all of them.
wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: str = None) → socketpool.Socket¶
Wraps the socket into a socket-compatible class that handles SSL negotiation. The socket must be of type SOCK_STREAM.