[issue22866] ssl module in 2.7 should provide a way to configure default context options

Marc-Andre Lemburg report at bugs.python.org
Thu Dec 11 20:03:05 CET 2014


Marc-Andre Lemburg added the comment:

Reopening the ticket, since I apparently missed the two important uses in the Python 2.7.9 stdlib:

urllib2.py:
--         context = ssl._create_stdlib_context(cert_reqs=ssl.CERT_REQUIRED,

httplib.py:
--                 context = ssl._create_default_https_context()

So it turns out that the context functions are indeed used for all stdlib HTTP interfacing.

The ssl module itself doesn't use the hardcoded defaults (which is good), but having to write your own context function and then monkey patching this into the stdlib doesn't sound like a good solution to changing the default SSL context options, should this be needed.

----------
status: closed -> open
title: ssl module in 2.7.9 should provide a way to configure default context options -> ssl module in 2.7 should provide a way to configure default context options

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22866>
_______________________________________


More information about the Python-bugs-list mailing list