This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kyoshida
Recipients christian.heimes, daniel-black, grooverdan, jcea, kyoshida, piotr.dobrogost, pitrou, python-dev
Date 2013-04-11.03:14:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365650095.91.0.718509923747.issue8109@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-04-11 03:14:56kyoshidasetrecipients: + kyoshida, jcea, pitrou, christian.heimes, grooverdan, python-dev, piotr.dobrogost, daniel-black
2013-04-11 03:14:55kyoshidasetmessageid: <1365650095.91.0.718509923747.issue8109@psf.upfronthosting.co.za>
2013-04-11 03:14:55kyoshidalinkissue8109 messages
2013-04-11 03:14:55kyoshidacreate