[FIPS 4.0 - CHERRY-PICK] Fix argument order in hmac_copy#3016
Merged
justsmth merged 1 commit intoaws:fips-2025-09-12from Feb 19, 2026
Merged
[FIPS 4.0 - CHERRY-PICK] Fix argument order in hmac_copy#3016justsmth merged 1 commit intoaws:fips-2025-09-12from
hmac_copy#3016justsmth merged 1 commit intoaws:fips-2025-09-12from
Conversation
skmcgrail
approved these changes
Feb 19, 2026
WillChilds-Klein
approved these changes
Feb 19, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fips-2025-09-12 #3016 +/- ##
===================================================
- Coverage 78.89% 78.71% -0.19%
===================================================
Files 667 667
Lines 113044 113057 +13
Branches 16060 16072 +12
===================================================
- Hits 89190 88988 -202
- Misses 23073 23293 +220
+ Partials 781 776 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Original PR: #3014
Issues:
Addresses: V2098002583
Context:
hmac_copy(theEVP_PKEY_CTXcopy handler for HMAC) passed thekTmpsource and destination arguments toHMAC_KEY_copyin the wrong order. WhenEVP_PKEY_CTX_dupwas called, the key material (ktmp) was zeroed out on the source context instead of being copied to the destination.Description of changes:
Corrects argument order and adds test.
Testing:
This adds a regression test that duplicates an HMAC keygen context and then generates keys from both the duplicate and the original, verifying the key bytes match the expected value.
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.