Skip to content

gh-159815: do not leave stale OpenSSL errors in _hashlib - #159816

Open
picnixz wants to merge 3 commits into
python:mainfrom
picnixz:meta/crypto/c/hashlib/34/openssl-peek-error-159815
Open

picnixz wants to merge 3 commits into
python:mainfrom
picnixz:meta/crypto/c/hashlib/34/openssl-peek-error-159815

Conversation

@picnixz

@picnixz picnixz commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

`raise_unsupported_algorithm_impl()` peeked the OpenSSL error queue without
clearing it on the `ERR_R_UNSUPPORTED` and `ERR_R_FETCH_FAILED` branches,
so a later unrelated failure in the same thread reported the earlier error.

Clear the queue in those branches, and clear it in callers before the
OpenSSL operations whose failure is reported by that function or before
calling `get_asn1_utf8name_by_nid()`, which inspects the last error.
@picnixz picnixz added needs backport to 3.15 bugs and security fixes sprint labels Oct 20, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Sprint Oct 20, 2026
@picnixz picnixz self-assigned this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant