Skip to content

Commit

Permalink
bpo-28958: Improve SSLContext error reporting. (python#3414)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <[email protected]>
  • Loading branch information
tiran authored Sep 7, 2017
1 parent 3147b04 commit 17c9ac9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ssl.SSLContext() now uses OpenSSL error information when a context cannot be
instantiated.
3 changes: 1 addition & 2 deletions Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 17c9ac9

Please sign in to comment.