Conversation
Register remaining SHA2 digests with OpenSSL's aliases and back it with AWS-LC's public SHA2 streaming API. Extend the parameterized frontend and backend suites so geometry, context copying, known-answer output, attribution, and short-output rejection cover the new variant.
The back side is reachable by a consumer that calls a dispatch slot directly rather than through EVP, so it cannot rely on the front side having already screened its arguments. Guard every entry point instead of dereferencing whatever arrives. The out_size rationale moves to the file header rather than repeating per algorithm, and the registry rows all name the names.h macro they copy so a future row has a checkable source.
geedo0
force-pushed
the
feat/sha2-all
branch
from
September 4, 2026 20:00
7522bac to
2345845
Compare
The digests.h declaration macro gives every algorithm an int-returning copy, but SHA-384, SHA-512, SHA-512/224 and SHA-512/256 were still defined as void, so the branch did not compile. Match the declaration and report a rejected NULL the way the other two already do.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/provider-sha224 #3485 +/- ##
========================================================
- Coverage 78.15% 78.14% -0.01%
========================================================
Files 700 700
Lines 125595 125595
Branches 17371 17373 +2
========================================================
- Hits 98154 98146 -8
- Misses 26570 26578 +8
Partials 871 871 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
🔒 Security Review — View Report Please review before merging. |
justsmth
self-requested a review
September 8, 2026 18:02
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
Stacked on #3449, which introduces the SHA-2 pattern this change applies. Review that one first.
Context and motivation
#3449 established what belongs to an operation class, what belongs to a family, and what an individual
algorithm owns, with SHA2-224 as its first application. This is the rest of the selected SHA-2 family.
After this the provider advertises SHA2-224, SHA2-256, SHA2-384, SHA2-512, SHA2-512/224, and
SHA2-512/256.
Description of changes
Backend (
backend/operations/digests/sha2.c). Four sets of bindings written out per algorithmrather than generated, so each AWS-LC type, constant, and function stays visible to review.
Frontend (
frontend/operations/digests/sha2.c). Per algorithm: one slot declaration macro, thintyped slot bodies naming their own backend entry points, and one dispatch-table macro. The family
helpers introduced in #3449 took no new parameters and no new abstraction.
Registry. Four rows, each citing the
names.hmacro it copies, carrying the OpenSSL spellings,aliases, and OID.
provider/ALGORITHM_SUPPORT.mdrecords the family.SHA2-256/192 is deliberately absent: AWS-LC exposes no public API for it, so that name stays the
default provider's to serve.
Testing
Both suites are parameterized, so each variant is one data row.
Review considerations
implementations report for these names.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache
2.0 license and the ISC license.