Python documentation states:
ssl.wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True) Takes an instance sock of socket.socket, and returns an instance of ssl.SSLSocket, a subtype of socket.socket, which wraps the underlying socket in an SSL context.
But when I try to use the SSL socket's create_connection method, I receive a:
ssl_sock.create_connection(('www.google.com', 443))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'SSLSocket' object has no attribute 'create_connection'