Keep AWS-LC's post-quantum defaults unless the policy opts out - #3505
Open
WillChilds-Klein wants to merge 1 commit into
Open
Keep AWS-LC's post-quantum defaults unless the policy opts out#3505WillChilds-Klein wants to merge 1 commit into
WillChilds-Klein wants to merge 1 commit into
Conversation
This was referenced Sep 9, 2026
WillChilds-Klein
force-pushed
the
feat/crypto-policies-5-preserve-pq
branch
from
September 9, 2026 19:29
760b594 to
8c285e9
Compare
WillChilds-Klein
force-pushed
the
feat/crypto-policies-5-preserve-pq
branch
from
September 9, 2026 21:08
8c285e9 to
f97b020
Compare
WillChilds-Klein
added this pull request to stack #3509
September 9, 2026 22:50
WillChilds-Klein
added a commit
that referenced
this pull request
Sep 11, 2026
Stack, split out of #3442, to merge bottom-up: 1. **#3501 -- error-queue primitives (this PR)** 2. #3502 -- policy file reader 3. #3503 -- cipher lists and version bounds 4. #3504 -- groups and signature algorithms 5. #3505 -- post-quantum defaults ## Description - Adds `ERR_num_errors` and `ERR_pop_to_count`, so code that calls into libcrypto on a caller's behalf can drop the errors it raised and leave the queue it was handed untouched. - The existing mark APIs cannot do this. `ERR_set_mark` needs an entry to mark, so it is a no-op on an empty queue, and popping to a mark consumes one the caller had already set. - `ERR_clear_error` and `ERR_restore_state` rebuild the queue, which dangles the data pointer the caller got from its last `ERR_get_error_line_data`. - A count is a position rather than a mark, so it nests inside a caller's mark without disturbing it. ## Testing / verification - New error-queue tests cover popping back to a recorded count, a count taken from an empty queue, and a count at or above the queue's length. - One case fills the ring past its capacity to confirm a stale count leaves the caller's errors alone. - One case wraps a nested call in the caller's own mark and an error carrying a data string, then checks the mark still pops and the string is intact. - One case pins that a mark does not survive `ERR_save_state`/`ERR_restore_state`, since a snapshot can be restored many times and would re-arm a mark nobody set. 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.
WillChilds-Klein
force-pushed
the
feat/crypto-policies-5-preserve-pq
branch
from
September 11, 2026 15:03
f97b020 to
577e735
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/crypto-policies-4-groups-sigalgs #3505 +/- ##
========================================================================
Coverage ? 78.40%
========================================================================
Files ? 700
Lines ? 125745
Branches ? 17386
========================================================================
Hits ? 98589
Misses ? 26285
Partials ? 871 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
WillChilds-Klein
force-pushed
the
feat/crypto-policies-5-preserve-pq
branch
from
September 11, 2026 19:53
577e735 to
fc6542b
Compare
Every policy the crypto-policies framework ships today predates ML-KEM and ML-DSA, and the group and signature-algorithm setters replace AWS-LC's defaults rather than intersect with them, so seeding downgraded every context. AWS-LC's post-quantum algorithms are now restored after filtering when the policy names none, and a policy that names any is left alone. A hybrid comes back only when the policy keeps its classical half, and one the policy removes with '-' stays out. The framework's directives cannot say "no post-quantum", so turning it off needs a directive of AWS-LC's own, AWSLC.PostQuantum.
WillChilds-Klein
force-pushed
the
feat/crypto-policies-5-preserve-pq
branch
from
September 11, 2026 20:16
fc6542b to
fcdb730
Compare
Contributor
|
🔒 Security Review — View Report Please review before merging. |
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.
Stack, split out of #3442, to merge bottom-up:
Description
secp384r1has noSecP384r1MLKEM1024either, and a group the policy removes with-stays out.AWSLC.PostQuantum = off, since nothing the framework writes says "no post-quantum". Other readers of the file ignore an unknown key.Testing / verification
x25519-mlkem768andml-dsa-65, are checked to resolve to AWS-LC's ids.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.