fix: restrict mldsa signatures based on certificate#5713
Merged
Conversation
dougch
approved these changes
Jan 28, 2026
maddeleine
reviewed
Jan 28, 2026
| POSIX_GUARD_RESULT(s2n_signature_algorithm_get_pkey_type(sig_scheme->sig_alg, &cert_type)); | ||
|
|
||
| /* A valid cert must exist for the authentication method. */ | ||
| struct s2n_cert_chain_and_key *cert = s2n_get_compatible_cert_chain_and_key(conn, cert_type); |
Contributor
There was a problem hiding this comment.
Do we need to look at all other places where s2n_get_compatible_cert_chain_and_key() is called? That function is used in multiple places.
Contributor
Author
There was a problem hiding this comment.
I think I'd prefer to go ahead and move ahead with this PR. I agree that we need to do a deeper dive, but I'd like to get the CI unblocked, and this is very concretely fixing a real bug.
CarolYeh910
approved these changes
Jan 31, 2026
maddeleine
approved these changes
Jan 31, 2026
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.
Goal
Allow us to correctly negotiate ML-DSA signatures.
Why
We fail to negotiate ML-DSA with the new release of OpenSSL
This change broke our CI.
This OpenSSL release included a stricter, more correct behavior
This broke us because our signature selection was not certificate aware. We were loading ML-DSA-87 certs
But the cert verify that the s2n-tls server was sending was not mldsa87
How
We updated the signature selection to properly handle MLDSA signatures. I also added an "else" case so any new certificate type will explicitly fail unless we handle it.
Related
Also, I am pinning time to get the CI to pass. That is blocking a different PR to fix the rust toolchains in the Nix stuff.
Testing
CI should pass
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.