feat(bindings): expose disable_x509_intent_verification API#5703
Merged
CarolYeh910 merged 1 commit intoaws:mainfrom Jan 15, 2026
Merged
feat(bindings): expose disable_x509_intent_verification API#5703CarolYeh910 merged 1 commit intoaws:mainfrom
CarolYeh910 merged 1 commit intoaws:mainfrom
Conversation
maddeleine
approved these changes
Jan 15, 2026
jouho
approved these changes
Jan 15, 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
Add rust binding for
s2n_config_disable_x509_intent_verification()APIWhy
Verifying certificate intent is a breaking change for some users. This disabling API serves as a workaround if impacted users can not update their invalid certs.
How
Invoke the FFI of the C function. I also added a
ca_certfield to theCertKeyPairstruct. Most of the unit tests pass the same cert/pem file toload_pem()andtrust_pem(). However, we can not catch theCERT_INTENT_INVALIDerror in this way because our intent validation excludes the trust anchor. The unit test passed after I specified the correct CA cert.Testing
Created a unit test to verify that given a certificate with invalid extensions,
CERT_INTENT_INVALIDwithout the disabling APIRelated
#5657
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.