Commit 17c9ac92 authored by Christian Heimes's avatar Christian Heimes Committed by GitHub

bpo-28958: Improve SSLContext error reporting. (#3414)

Signed-off-by: default avatarChristian Heimes <christian@python.org>
parent 3147b042
ssl.SSLContext() now uses OpenSSL error information when a context cannot be
instantiated.
...@@ -2636,8 +2636,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) ...@@ -2636,8 +2636,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
return NULL; return NULL;
} }
if (ctx == NULL) { if (ctx == NULL) {
PyErr_SetString(PySSLErrorObject, _setSSLError(NULL, 0, __FILE__, __LINE__);
"failed to allocate SSL context");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment