mirror of
https://github.com/python/cpython.git
synced 2025-10-03 21:55:41 +00:00
bpo-28958: Improve SSLContext error reporting. (#3414)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
3147b0422c
commit
17c9ac927b
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.
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue