indygreg / apple-platform-rs

Rust crates supporting Apple platform development
595 stars 49 forks source link

Removing signature/`--force` #72

Open melvyn2 opened 1 year ago

melvyn2 commented 1 year ago

There are some problems where re-signing an a binary will lead to a bad signature/unlaunchable app. It would be useful to have an operation that matches codesign's --remove-signature flag. Additionally, a flag --force or --overwrite for sign operations that first removes the signature would be useful when running into these bugs.

Currently I just run codesign --remove-signature before signing, but obviously this removes the benefit of not having to rely on apple tools.

indygreg commented 1 year ago

The main branch has a few bug fixes related to re-signing a binary. I consider failure to re-sign a bug. Please file issues for any problems re-signing.

In addition, I think it makes sense to offer a command to strip signatures. It is something that codesign can do and is somewhat common in user workflows. So tagging accordingly.

tylerd-canva commented 6 days ago

Another usecase for --remove-signature is the Node.js Single Executable Application workflow: https://nodejs.org/api/single-executable-applications.html#single-executable-applications