Conversation
* Add test with TSR with injected cert The added certificate is not part of the cert chain Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> * Prevent verification with cert outside the cert chain Currently VerifyLeafCert and verifyTSRWithChain may disagree on which cert is the real leaf certificate (TSA certificate): VerifyLeafCert should use the leaf certificate identified by verifyTSRWithChain. * Return the signer cert from verifyTSRWithChain() so verifyLeafCert() can just use the correct cert * Make sure verifyTSRWithChain() ensures that we have signer cert (either embedded or provided as option) * Make sure verifyTSRWithChain() verifies that embedded and provided cert match if both are present * Modify verifyLeafCert() so it only operates on given leaf cert Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> * Remove unused function verifyEmbeddedLeafCert is now not needed: the check is already done in verifyTSRWithChain. Remove the related test, add test cases to cover the same situatation in verifyTSRWithChain. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> --------- Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
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.
verifyTSRWithChain and verifyLeafCert both need to find the signer (TSA) certificate from the PKCS7 certificate bag. Currently, if the bag has been injected with another leaf certificate, verifyLeafCert may use the wrong certificate to do authorization checks on.