]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127812)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 12 Dec 2024 11:44:53 +0000 (12:44 +0100)
committerGitHub <noreply@github.com>
Thu, 12 Dec 2024 11:44:53 +0000 (12:44 +0100)
commit2a7866387077cd5d550bfd42ff7c3409236463c8
tree17670eb6e857dd116954dcd3d11b4d58d928c549
parent8b24d042b4d23700f873c23f78cee0972ad24f62
[3.13] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127812)

gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361)

From the ERR_raise manpage:

    ERR_LIB_SYS

        This "library code" indicates that a system error is
        being reported.  In this case, the reason code given
        to `ERR_raise()` and `ERR_raise_data()` *must* be
        `errno(3)`.

This PR only handles ERR_LIB_SYS for the high-lever error types
SSL_ERROR_SYSCALL and SSL_ERROR_SSL, i.e., not the ones where
OpenSSL indicates it has some more information about the issue.
(cherry picked from commit f4b31edf2d9d72878dab1f66a36913b5bcc848ec)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst [new file with mode: 0644]
Modules/_ssl.c