Kazuhiro Yoshida added the comment:

I am trying to use SSLContext.set_servername_callback in my program but when a 
callback is set, it seems that connecting to the server without providing a 
server name causes a segmentation fault. (e.g. 'openssl s_client -connect 
localhost:443 -servername foo' is OK but 'openssl s_client -connect 
localhost:443' crashes the server. A simple test that causes the same error is 
included in the patch.)

My expectation was to get None as the second argument of the callback in such 
cases so I modified Modules/_ssl.c (as in the patch) to make it behave as I 
expected.

The modification seems to work fine as far as I've tested, but I'd appreciate 
if an official fix is available.

----------
nosy: +kyoshida
Added file: http://bugs.python.org/file29770/issue-8109.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8109>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to