indygreg / indygreg/PyOxidizer

Notarize a Mach-O binary?

Open
#681 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

Trying to sign and notarize a macOS Mach-O binary according to [`rcodesign` docs](https://gregoryszorc.com/docs/apple-codesign/main/apple_codesign_rcodesign.html), I encountered `Error: do not know how to notarize /tmp/signed-cli` at the notarization step:

```
# file /tmp/signed-app
/tmp/signed-app: Mach-O 64-bit arm64 executable, flags:<|DYLDLINK|PIE>

# rcodesign notary-submit --verbose --api-key-path /tmp/generated-app-store-connect-api-key.json /tmp/signed-app
Error: do not know how to notarize /tmp/signed-app
```

Following the source code, I understand from [this block](https://github.com/indygreg/apple-platform-rs/blob/d5e608a0391a4b453b904f8aa5862b2b5925afef/apple-codesign/src/notarization.rs#L189-L191) that notarization using `rcodesign` is currently unsupported for Mach-O binaries.

Is it possible to implement? Is it easy?
Trying to put the binary in a zip, I stopped getting this error. Is it the right way to go?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked block in apple-codesign/src/notarization.rs and the rcodesign notarization documentation. Reproduce the notary-submit command with the Mach-O binary, then compare it with the ZIP workflow described in the issue. Done should mean the supported behavior for direct Mach-O notarization is implemented or the documentation clearly states the required packaging and limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.