Skip to content

Document that macOS Archive Utility rejects signed .zip files - #68

Open
jqnatividad wants to merge 2 commits into
Kijewski:mainfrom
jqnatividad:docs-zip-compat
Open

jqnatividad wants to merge 2 commits into
Kijewski:mainfrom
jqnatividad:docs-zip-compat

Conversation

@jqnatividad

@jqnatividad jqnatividad commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

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?":

  • Readers that handle signed .zip files: unzip, bsdtar/tar, Python's zipfile, and third-party unarchivers like The Unarchiver.
  • Readers that don't: macOS's built-in Archive Utility and ditto. They require a ZIP header at offset 0 and report the file as unsupported.
  • Workarounds on macOS, from easiest:
    • tar -xf <INPUT> or unzip <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.md is a symlink to README.md, so both are covered.

Verified on macOS 27.0.1

Tool Plain zip Signed zip After zipsign unsign
ditto -x -k (Archive Utility's engine) ok Couldn't read PKZip signature ok
bsdtar (tar -xf) ok ok ok
unzip -t ok ok ok
Python zipfile ok ok ok

Trimming the signature bytes off the front (e.g. with tail -c) is not a workaround. unsign rewrites the ZIP rather than just cutting off a prefix, and a trimmed file still fails in ditto.

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

jqnatividad and others added 2 commits October 25, 2026 09:45
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant