forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-127257: Add hex code to ssl "unknown error" message (pythonG…
…H-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.)
- Loading branch information
Showing
2 changed files
with
51 additions
and
16 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2024-11-28-14-24-12.gh-issue-127360.HVKt-c.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
When a descriptive error message cannot be provided for an | ||
:exc:`ssl.SSLError`, the "unknown error" message now shows the internal | ||
error code (as retrieved by ``ERR_get_error`` and similar OpenSSL | ||
functions). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters