]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-127257: Add hex code to ssl "unknown error" message (GH-127360)
authorPetr Viktorin <encukou@gmail.com>
Fri, 10 Jan 2025 12:59:51 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Fri, 10 Jan 2025 12:59:51 +0000 (13:59 +0100)
commit802556abfa008abe0bdd78e6f9e18bef71db90c1
treec7a2f1405b1bb5f62603cb3b53c361ef5965cf7e
parent688f3a0d4b94874ff6d72af3baafd8bbf911153e
gh-127257: Add hex code to ssl "unknown error" message (GH-127360)

* ssl: Add hex error code to "unknown error" messages

To make it easier to vary the individual parts of the message,
replace the if-ladder with constant format strings by building
the string piece-wise with PyUnicodeWriter.

Use "unknown error (0x%x)" rather than just "unknown error" if we
can't get a better error message. (Hex makes sense as the error
includes two packed parts.)
Misc/NEWS.d/next/Library/2024-11-28-14-24-12.gh-issue-127360.HVKt-c.rst [new file with mode: 0644]
Modules/_ssl.c