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: Python should return comperhansive error when SSLContext cannot be created
Type: enhancement Stage: resolved
Components: SSL Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: Ilya.Kulakov, christian.heimes
Priority: normal Keywords: patch

Created on 2016-12-13 06:55 by Ilya.Kulakov, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3414 merged christian.heimes, 2017-09-07 02:46
PR 3432 merged christian.heimes, 2017-09-07 22:24
PR 3433 merged christian.heimes, 2017-09-07 22:24
PR 3436 closed python-dev, 2017-09-07 22:39
Messages (4)
msg283078 - (view) Author: Ilya Kulakov (Ilya.Kulakov) * Date: 2016-12-13 06:55
When SSLContext cannot be created, python raises an SSLError exception with "failed to allocate SSL context".

https://hg.python.org/cpython/file/4def2a2901a5/Modules/_ssl.c#l2260

This is completely useless to debug the error. In fact many errors raised from _ssl.c are non-helpful.

Python's SSLError should be extended to include comprehensive information about OpenSSL's error stack which can be extracted with `ERR_get_error_line`.
msg301637 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-09-07 22:25
New changeset 17c9ac927b97472dd080174fde709d9234848195 by Christian Heimes in branch 'master':
bpo-28958: Improve SSLContext error reporting. (#3414)
https://github.com/python/cpython/commit/17c9ac927b97472dd080174fde709d9234848195
msg301649 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-09-07 23:45
New changeset 611a3eab194dfd0a54e541e8e8547051df24bcfc by Christian Heimes in branch '2.7':
[2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3433)
https://github.com/python/cpython/commit/611a3eab194dfd0a54e541e8e8547051df24bcfc
msg301650 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-09-07 23:45
New changeset 6c99b652f7909f86753b9e567ea18c95ee736e83 by Christian Heimes in branch '3.6':
[3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3432)
https://github.com/python/cpython/commit/6c99b652f7909f86753b9e567ea18c95ee736e83
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73144
2017-09-07 23:48:25christian.heimessetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-09-07 23:45:41christian.heimessetmessages: + msg301650
2017-09-07 23:45:09christian.heimessetmessages: + msg301649
2017-09-07 22:39:17python-devsetpull_requests: + pull_request3433
2017-09-07 22:25:42christian.heimessetmessages: + msg301637
2017-09-07 22:24:35christian.heimessetpull_requests: + pull_request3430
2017-09-07 22:24:32christian.heimessetkeywords: + patch
stage: patch review
pull_requests: + pull_request3429
2017-09-07 02:46:07christian.heimessetpull_requests: + pull_request3414
2016-12-13 06:55:01Ilya.Kulakovcreate