Fix error reporting and document EC explicit params single-cert beha…#3044
Merged
Fix error reporting and document EC explicit params single-cert beha…#3044
Conversation
skmcgrail
approved these changes
Feb 25, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3044 +/- ##
==========================================
- Coverage 78.52% 78.35% -0.18%
==========================================
Files 689 689
Lines 121012 121017 +5
Branches 16996 16967 -29
==========================================
- Hits 95030 94824 -206
- Misses 25083 25296 +213
+ Partials 899 897 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
samuel40791765
approved these changes
Feb 25, 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.
Description of changes:
Two small fixes in
crypto/x509/x509_vfy.c:In
internal_verify, the post-loop leaf public key check was settingctx->current_cert = xi(the issuer) instead ofxs(the subject). The chain was still correctly rejected — just the diagnostic metadata pointed at the wrong cert. Fixed toxs.Added a comment explaining why the EC explicit params check in
check_chain_extensionsintentionally skips single-cert chains (num > 1). This matches OpenSSL 1.1.1 behavior and is fine because single-cert chains are already in the trust store. No behavioral change.Call-outs:
Neither issue is a security vulnerability. One is a one-line code fix, the other is comment-only.
Testing:
All existing X509 tests pass.
X509Test.SignatureVerificationandX509CompatTest.LeafCertificateWithExplicitECParamsboth cover the relevant code paths.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.