crypto: Implement issued check for symcrypt, improve error handling#3444
Open
smalis-msft wants to merge 4 commits intomicrosoft:mainfrom
Open
crypto: Implement issued check for symcrypt, improve error handling#3444smalis-msft wants to merge 4 commits intomicrosoft:mainfrom
smalis-msft wants to merge 4 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR tightens X.509 chain validation by making the issued() check return Result<bool, X509Error>, enhancing SymCrypt’s “issued by” logic, and surfacing OpenSSL backend errors instead of silently treating them as non-OK.
Changes:
- Change
X509Certificate::issued()and backend implementations to returnResult<bool, X509Error>. - Implement additional issuer/subject checks in the SymCrypt backend (KeyUsage + AKID/SKID matching).
- Update JWT certificate-chain validation to propagate
issued()errors as a distinct error variant.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| support/crypto/src/x509/symcrypt.rs | Expands SymCrypt “issued by” checks and changes return type to Result. |
| support/crypto/src/x509/ossl.rs | Changes OpenSSL “issued by” to Result and introduces result-code mapping / error handling. |
| support/crypto/src/x509/mod.rs | Updates public API to return Result<bool, X509Error>. |
| openhcl/underhill_attestation/src/jwt.rs | Propagates new issued() errors during cert-chain validation. |
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.
Properly check all of the cases needed to ensure issuance in the symcrypt backend, and add error handling to the openssl backend instead of ignoring them.