Since Python 3.10, calling ssl.SSLContext() without specifying the protocol is deprecated (see docs). This sets the protocol to act as a server, as the socket in server_bind() method is being wrapped with server_side=True set. This means hostname checking gets disabled.
Since Python 3.10, calling
ssl.SSLContext()
without specifying the protocol is deprecated (see docs). This sets the protocol to act as a server, as the socket inserver_bind()
method is being wrapped withserver_side=True
set. This means hostname checking gets disabled.