Repository navigation
Document that macOS Archive Utility rejects signed .zip files - #68
Open
jqnatividad wants to merge 2 commits into
Open
jqnatividad wants to merge 2 commits into
jqnatividad wants to merge 2 commits into
Conversation
zipsign prepends the signature to the ZIP data. Most readers handle
that, but Archive Utility and `ditto` require a ZIP header at offset 0
("ditto: Couldn't read PKZip signature"). Document the affected and
working tools, and the `zipsign unsign` workaround.
Addresses Kijewski#27.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tar` (bsdtar) and `unzip` ship with macOS and extract signed .zip files as-is, so recipients don't need zipsign to open them. Also note that `zipsign unsign` makes the file unverifiable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Addresses #27, which asked for this to be documented.
What
zipsign prepends the signature block to the ZIP data. The README explains that this works because ZIP files can carry prepended data, which is true for most readers but not Apple's. This adds a short compatibility note to "How does it work?":
.zipfiles:unzip,bsdtar/tar, Python'szipfile, and third-party unarchivers like The Unarchiver.ditto. They require a ZIP header at offset 0 and report the file as unsupported.tar -xf <INPUT>orunzip <INPUT>. Both come preinstalled with macOS and read signed files as-is, so recipients don't need zipsign.zipsign unsign zip <INPUT>, after which Archive Utility opens the file. It can no longer be verified, and the note says so.cli/README.mdis a symlink toREADME.md, so both are covered.Verified on macOS 27.0.1
zipsign unsignditto -x -k(Archive Utility's engine)Couldn't read PKZip signaturebsdtar(tar -xf)unzip -tzipfileTrimming the signature bytes off the front (e.g. with
tail -c) is not a workaround.unsignrewrites the ZIP rather than just cutting off a prefix, and a trimmed file still fails inditto.The Unarchiver comes from the report in #27; I didn't test it myself.
Not included
Making Archive Utility accept signed files would mean moving the signature away from offset 0 (e.g. into the ZIP comment). That's a new on-disk format that existing versions couldn't verify, so I left it out. Happy to work on it if you want to go that way.
🤖 Generated with Claude Code