Issue2461

classification
Title: SSL Handshake fails for peers connected via IPV6
Type: Severity: normal
Components: Library Versions: Jython 2.7
Milestone: Jython 2.7.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: teeohhem, zyasoft
Priority: high Keywords:

Created on 2016-02-08.15:17:10 by teeohhem, last changed 2016-09-06.00:19:20 by zyasoft.

Messages
msg10725 (view) Author: Tom Alexander (teeohhem) Date: 2016-02-08.15:17:10
In the latest trunk, SSL Handshakes fail for peers connected via IPV6. The code makes an assumption that socket.getpeername() will return a tuple containing two values, where in IPV6 the tuple contains four values. 

socket.getpeername()'s format depends on the returned family. (address, port) 2-tuple for AF_INET and (address, port, flow info, scope id) 4-tuple for AF_INET6)

This line is the culprit in Lib/ssl.py
engine = context.createSSLEngine(*addr), where addr is the tuple returned from socket.getpeername()
msg10726 (view) Author: Jim Baker (zyasoft) Date: 2016-02-08.15:51:15
Fix for RC
msg10729 (view) Author: Tom Alexander (teeohhem) Date: 2016-02-08.18:24:17
I have a pull request to fix this issue: https://github.com/jythontools/jython/pull/32
msg10912 (view) Author: Jim Baker (zyasoft) Date: 2016-08-24.21:41:43
Fixed as of https://hg.python.org/jython/rev/3881da5b10a8
History
Date User Action Args
2016-09-06 00:19:20zyasoftsetstatus: pending -> closed
2016-08-24 21:41:43zyasoftsetstatus: open -> pending
assignee: zyasoft
resolution: accepted -> fixed
messages: + msg10912
2016-02-08 18:24:17teeohhemsetmessages: + msg10729
2016-02-08 15:51:15zyasoftsetpriority: high
resolution: accepted
messages: + msg10726
nosy: + zyasoft
milestone: Jython 2.7.1
2016-02-08 15:17:11teeohhemcreate