]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] Revert "[3.10] gh-107077: Raise SSLCertVerificationError even if the error...
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Thu, 3 Aug 2023 20:35:42 +0000 (21:35 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Aug 2023 20:35:42 +0000 (21:35 +0100)
Misc/NEWS.d/next/Library/2023-08-03-12-52-19.gh-issue-107077.-pzHD6.rst [deleted file]
Modules/_ssl.c

diff --git a/Misc/NEWS.d/next/Library/2023-08-03-12-52-19.gh-issue-107077.-pzHD6.rst b/Misc/NEWS.d/next/Library/2023-08-03-12-52-19.gh-issue-107077.-pzHD6.rst
deleted file mode 100644 (file)
index ecaf437..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Seems that in some conditions, OpenSSL will return ``SSL_ERROR_SYSCALL``
-instead of ``SSL_ERROR_SSL`` when a certification verification has failed,
-but the error parameters will still contain ``ERR_LIB_SSL`` and
-``SSL_R_CERTIFICATE_VERIFY_FAILED``. We are now detecting this situation and
-raising the appropiate ``ssl.SSLCertVerificationError``. Patch by Pablo
-Galindo
index bb0508f9aceecc14d7788c270709042221582627..7a28f2d37f6c559d9855eb9259291187adf10730 100644 (file)
@@ -656,10 +656,6 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno)
                     errstr = "Some I/O error occurred";
                 }
             } else {
-                if (ERR_GET_LIB(e) == ERR_LIB_SSL &&
-                        ERR_GET_REASON(e) == SSL_R_CERTIFICATE_VERIFY_FAILED) {
-                    type = state->PySSLCertVerificationErrorObject;
-                }
                 p = PY_SSL_ERROR_SYSCALL;
             }
             break;