Commit e0f9863a authored by Giampaolo Rodolà's avatar Giampaolo Rodolà

Issue #9693 - msg 115273: attempt to fix ssl module failures on certain...

Issue #9693 - msg 115273: attempt to fix ssl module failures on certain OpenSSL versions by calling ERR_clear_error() before raising IOError
parent fce7fd64
......@@ -1603,6 +1603,7 @@ load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwds)
PySSL_END_ALLOW_THREADS
if (r != 1) {
if (errno != 0) {
ERR_clear_error();
PyErr_SetFromErrno(PyExc_IOError);
}
else {
......@@ -1619,6 +1620,7 @@ load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwds)
Py_XDECREF(certfile_bytes);
if (r != 1) {
if (errno != 0) {
ERR_clear_error();
PyErr_SetFromErrno(PyExc_IOError);
}
else {
......@@ -1686,6 +1688,7 @@ load_verify_locations(PySSLContext *self, PyObject *args, PyObject *kwds)
Py_XDECREF(capath_bytes);
if (r != 1) {
if (errno != 0) {
ERR_clear_error();
PyErr_SetFromErrno(PyExc_IOError);
}
else {
......
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