require timestamping leaf certificate to be an end-entity#1416
Open
dxbjavid wants to merge 1 commit into
Open
Conversation
Signed-off-by: Javid Khan <dxbjavid@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1416 +/- ##
===========================================
- Coverage 52.85% 26.39% -26.46%
===========================================
Files 20 55 +35
Lines 1209 3171 +1962
===========================================
+ Hits 639 837 +198
- Misses 509 2282 +1773
+ Partials 61 52 -9 ☔ View full report in Codecov by Harness. 🚀 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.
verifyLeafCert and VerifyCertChain enforce that a timestamping leaf has a single critical timestamping EKU but never look at its basic constraints, so a certificate that asserts the CA bit while carrying that EKU is accepted as a TSA signer. crypto/x509 chain verification does not reject a CA certificate used as the leaf, so nothing else catches it, and that goes against RFC 3161 2.3 which expects the TSA certificate to be an end-entity and keeps certificate-issuing keys separate from timestamp-signing keys. This rejects a leaf whose basic constraints mark it as a CA in both the response-verification and issuance-chain paths.