Commit 611a3eab authored by Christian Heimes's avatar Christian Heimes Committed by GitHub

[2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3433)

Signed-off-by: default avatarChristian Heimes <christian@python.org>
(cherry picked from commit 17c9ac92)
parent 82cae7c5
ssl.SSLContext() now uses OpenSSL error information when a context cannot be
instantiated.
......@@ -2146,8 +2146,7 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
}
if (ctx == NULL) {
PyErr_SetString(PySSLErrorObject,
"failed to allocate SSL context");
_setSSLError(NULL, 0, __FILE__, __LINE__);
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