Gregory P. Smith
d761f539bd
gh-146287: Fix signed/unsigned mismatch in _hashlib_hmac_digest_size (GH-148407)
...
* gh-146287: use signed type for HMAC digest size to prevent unsigned wrapping
Change _hashlib_hmac_digest_size() return type from unsigned int to int
so that a hypothetical negative return from EVP_MD_size() is not
silently wrapped to a large positive value. Add an explicit check for
negative digest_size in the legacy OpenSSL path, and use SystemError
(not ValueError) since these conditions indicate internal invariant
violations. Also add debug-build asserts to EVP_get_block_size and
EVP_get_digest_size documenting that the hash context is always
initialized.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2026-04-12 00:02:56 +00:00
..
2026-04-08 09:15:11 +02:00
2026-04-02 23:20:13 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-11 09:10:02 +01:00
2026-03-29 14:21:37 +02:00
2026-04-02 23:20:13 +02:00
2026-03-25 07:44:47 +01:00
2026-04-08 09:15:11 +02:00
2026-04-11 23:01:25 +09:00
2026-04-08 09:15:11 +02:00
2026-04-09 08:52:30 +01:00
2026-03-29 12:58:12 -07:00
2026-04-02 23:24:03 +02:00
2026-04-04 21:26:16 +03:00
2026-03-29 19:05:14 +02:00
2026-03-24 17:47:55 +00:00
2026-04-09 18:50:50 +05:30
2026-03-24 17:47:55 +00:00
2026-04-11 14:13:51 -07:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-11 15:18:02 -07:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:24:03 +02:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:20:13 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-12 00:02:56 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:24:03 +02:00
2026-04-11 22:26:36 +00:00
2026-03-24 17:47:55 +00:00
2026-04-07 22:56:19 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:20:13 +02:00
2026-04-02 23:20:13 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-02-13 13:06:07 -06:00
2026-04-02 23:24:03 +02:00
2026-03-26 11:12:49 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-26 15:26:34 +01:00
2026-04-09 18:50:50 +05:30
2026-03-17 12:16:35 +02:00
2026-03-31 10:58:27 +03:00
2026-03-02 11:47:32 +01:00
2026-04-08 09:15:11 +02:00
2026-04-08 09:15:11 +02:00
2026-04-02 23:20:13 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-04 13:29:17 +01:00
2026-04-02 23:20:13 +02:00
2026-03-24 17:47:55 +00:00
2026-04-07 08:44:03 +01:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-04 18:42:30 +01:00
2026-03-09 19:37:33 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:20:13 +02:00
2026-04-02 23:20:13 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:24:03 +02:00
2026-04-02 23:24:03 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:24:03 +02:00
2025-11-25 12:51:24 +00:00
2026-03-10 11:44:20 +01:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-04-02 23:24:03 +02:00
2026-04-02 23:24:03 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-19 16:20:18 +05:30
2026-03-24 17:47:55 +00:00
2026-02-21 18:27:55 +01:00
2026-03-24 17:47:55 +00:00
2026-02-18 12:58:21 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00