Skip to content

[3.14] gh-134531: cleanup _hashopenssl.c to support EVP_MAC (GH-134626) #134703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 26, 2025

Rename components related to _hashlib.{HASH,HASHXOF} objects.

  • The EVPobject structure is renamed HASHobject.
  • Non-clinic HASH methods are now prefixed by _hashlib_HASH_*.
    A similar change is made for non-clinic HASHXOF methods.
  • Functions extracting information from EVP_MD objects and functions
    constructing EVP_MD objects now include openssl_evp_md in their name.

This change allows us to avoid future ambiguities between the EVP_MD
and the EVP_MAC APIs (currently, we only use EVP_MD for hash functions
and rely on the legacy interface for HMAC instead of using EVP_MAC).
(cherry picked from commit cb8045e)

Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com

…nGH-134626)

Rename components related to `_hashlib.{HASH,HASHXOF}` objects.

- The `EVPobject` structure is renamed `HASHobject`.
- Non-clinic `HASH` methods are now prefixed by `_hashlib_HASH_*`.
  A similar change is made for non-clinic `HASHXOF` methods.
- Functions extracting information from `EVP_MD` objects and functions
  constructing `EVP_MD` objects now include `openssl_evp_md` in their name.

This change allows us to avoid future ambiguities between the `EVP_MD`
and the `EVP_MAC` APIs (currently, we only use `EVP_MD` for hash functions
and rely on the legacy interface for HMAC instead of using `EVP_MAC`).
(cherry picked from commit cb8045e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@picnixz
Copy link
Member

picnixz commented May 26, 2025

I'm a bit hesistant now... On one's side, it will ease my life when handling conflicts, but.... at the same time, because of the additional complexity of EVP_MAC in the file, I actually think I'll anyway have conflicts. So to be on the safe side (and since the beta is near), I'll just forget all backports and will just keep it in 3.15 for now. If there are issues later, we can apply those changes first.

@picnixz picnixz closed this May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants