]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 16 Dec 2024 14:43:57 +0000 (15:43 +0100)
committerGitHub <noreply@github.com>
Mon, 16 Dec 2024 14:43:57 +0000 (15:43 +0100)
commit7f707fa6c67d0bfa9bbc1a9f344b932789659397
treef3447d371654acd91cf612de38e836cf26eec080
parent3d7b5b369a2c05efb033811b25f35d767d87769d
[3.12] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905)

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