bpo-28958: Improve SSLContext error reporting. (#3414)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
3147b0422c
commit
17c9ac927b
|
@ -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;
|
||||
}
|
||||
if (ctx == NULL) {
|
||||
PyErr_SetString(PySSLErrorObject,
|
||||
"failed to allocate SSL context");
|
||||
_setSSLError(NULL, 0, __FILE__, __LINE__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue