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.

classification
Title: ssl.SSLContext.load_cert_chain() backport regression with None as keyfile
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou, python-dev, till
Priority: normal Keywords: needs review, patch

Created on 2014-11-03 15:09 by till, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
poc.txt till, 2014-11-03 15:09 Sample code with invocation to show the issue
issue22787.diff alex, 2014-11-03 15:23
Messages (3)
msg230539 - (view) Author: Till Maas (till) Date: 2014-11-03 15:09
https://github.com/python/cpython/commit/71a4ee3ea2c6847b9fc4b33cbc8d565a7bf2424a

introduces a regression in ssl.SSLContext.load_cert_chain()

https://github.com/python/cpython/blob/2.7/Modules/_ssl.c#L2462

With this change it is not possible to specify None as keyfile which can 
be triggered on Debian Testing? (there the change is backported) in requests.get("https://example.com", cerf="keycert.pem"). It can also be triggered with the sample code in the attached file. It is fixed in recent python 3.
msg230540 - (view) Author: Till Maas (till) Date: 2014-11-03 15:10
sorry, it should be:
    requests.get("https://example.com", cert="keycert.pem")
msg230571 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-11-04 02:12
New changeset e54d0b197c82 by Benjamin Peterson in branch '2.7':
allow keyfile argument to be None (closes #22787)
https://hg.python.org/cpython/rev/e54d0b197c82
History
Date User Action Args
2022-04-11 14:58:09adminsetgithub: 66976
2014-11-04 02:12:20python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg230571

resolution: fixed
stage: resolved
2014-11-03 15:23:44alexsetkeywords: + needs review
2014-11-03 15:23:37alexsetfiles: + issue22787.diff
keywords: + patch
2014-11-03 15:12:46alexsetnosy: + janssen, pitrou, giampaolo.rodola, christian.heimes, alex, dstufft
2014-11-03 15:10:07tillsetmessages: + msg230540
2014-11-03 15:09:21tillcreate