Validate DID by default in check command#39
Merged
Conversation
KenGordon
approved these changes
May 20, 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.
Summary
Make
sign1util checkautomatically validate the embeddedissagainst the cert chain when--didis omitted, fix a swallowed-error bug in the resolver path, and stabilise the Makefile tests.Changes
cmd/sign1util/main.gocheck: if--didis not provided, resolve the COSE document's ownissagainst the embedded chain and return any resolver error to the caller.:=shadowing incheckCoseSign1that previously droppedResolveerrors.checkCoseSign1to callers that actually pass adidString, so unrelated commands (print,leaf,did-x509 -in) don't perform unwanted DID resolution.pkg/cosesign1/Makefiledid-check,did-fail-subject) now derive it inline fromchain.pemat recipe time. The previously-introducedAUTOPARSE_CHAINtoggle and sharedISSUER_DIDvariable are removed — they conflated the COSEisslabel (a literal asserted by the unit test) with a verifiable DID.did-fail-*) invert the expected non-zero exit with!so the make target succeeds on a tool-level failure.pkg/cosesign1/Makefile.certsdidx509go(CurrentTime: chain[0].NotAfter, seepkg/did-x509-resolver/resolver.go:36TODO https://github.com/microsoft/didx509go/blob/main/pkg/did-x509-resolver/resolver.go#L36) that caused intermittent 1-second "current time after notAfter" CI failures when cert generation crossed a wall-clock second boundary. Failure example before the fix: https://github.com/microsoft/cosesign1go/actions/runs/26151406837/job/76919529317Tests
make allandgo test ./...pass locally.