Skip to content

Commit d34d116

Browse files
picnixzPranjal095
authored andcommitted
pythongh-135234: improve _hashlib exceptions when reporting an OpenSSL function failure (python#135250)
- Refactor `get_openssl_evp_md_by_utf8name` error branches. - Refactor `HASH.{digest,hexdigest}` computations. - Refactor `_hashlib_HASH_copy_locked` and `locked_HMAC_CTX_copy`.
1 parent 89778b7 commit d34d116

File tree

2 files changed

+199
-122
lines changed

2 files changed

+199
-122
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:mod:`hashlib`: improve exception messages when an OpenSSL function failed.
2+
When memory allocation fails on OpenSSL's side, a :exc:`MemoryError` is
3+
raised instead of a :exc:`ValueError`. Patch by Bénédikt Tran.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy