[Jython-checkins] jython: Support SSL handshaking for IPv6 peers. Fixes #2461
jim.baker
jython-checkins at python.org
Wed Aug 24 17:40:35 EDT 2016
https://hg.python.org/jython/rev/3881da5b10a8
changeset: 7933:3881da5b10a8
user: Tom Alexander <tom.alexander at datastax.com>
date: Wed Aug 24 17:40:27 2016 -0400
summary:
Support SSL handshaking for IPv6 peers. Fixes #2461
files:
Lib/ssl.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Lib/ssl.py b/Lib/ssl.py
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -1073,10 +1073,8 @@
self._key_managers.getKeyManagers(),
trust_managers, None)
- if hostname is not None:
- engine = context.createSSLEngine(hostname, addr[1])
- else:
- engine = context.createSSLEngine(*addr)
+ # addr could be ipv6, only extract relevant parts
+ engine = context.createSSLEngine((hostname or addr[0]), addr[1])
# apparently this can be used to enforce hostname verification
if hostname is not None and self._check_hostname:
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list