Jean-Paul Calderone <exar...@twistedmatrix.com> added the comment: Here's another possible approach:
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) ctx.set_tlsext_host_name("foo.bar") skt = ctx.wrap_socket(socket.socket()) skt.connect("bar.baz") This makes it obvious what the SNI hostname is and what the TCP address to connect to is, and they can easily be different. ---------- nosy: +exarkun _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5639> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com