Repository navigation
fix(update): check macOS notarization online, since a bare binary has no stapled ticket - #7
Merged
Merged
Conversation
… no stapled ticket
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.
The installer and the self-updater checked macOS binaries with
codesign --verify --strict -R=<requirement>. The requirement ends innotarized, and a bare Mach-O can't have a ticket stapled, so codesign only finds the ticket if it asks Apple online (--check-notarization) or if Gatekeeper has already looked that binary up on the computer. Without the flag:isn't signed and notarized by Anomaly; nothing was installed), which is how stable 0.1.11 failed on a fresh installsign-macos.shalready ends with this flag and says the updater does the same. Now both do.Verified
macos-x64binary, which this Mac had never looked up: the old check fails, andSignature.verifyMacosfrom this branch passes.macos-arm64: Gatekeeper reportssource=Notarized Developer ID. The old check failed untilspctlcached the ticket, then passed.installdownloads, verifies and runs 0.1.11 on this Mac.bun run checkandtest/signature.test.tsandtest/installer.test.tspass.No new test: telling a stapled ticket from an online one needs a notarized binary the test machine hasn't seen, which a unit test can't make. Stable 0.1.12 will prove it on a fresh binary.