mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
[3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3432)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 17c9ac9
)
This commit is contained in:
parent
fb4c28c032
commit
6c99b652f7
2 changed files with 3 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
ssl.SSLContext() now uses OpenSSL error information when a context cannot be
|
||||||
|
instantiated.
|
|
@ -2643,8 +2643,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue