File: macos.md

package info (click to toggle)
relic 7.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,108 kB
  • sloc: sh: 230; makefile: 10
file content (34 lines) | stat: -rw-r--r-- 1,010 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Signing MacOS binaries
relic has preliminary support for signing MacOS and iOS binaries.

For example, to sign a Mac binary for offline distribution, you will need a DevID certificate.
Configure relic to use the cert with Apple's timestamp servers:

```yaml
keys:
  devid:
    token: file
    x509certificate: ./devid.crt
    keyfile: ./devid.key
    timestamp: true

tokens:
  file:
    type: file
timestamp:
  urls:
    - http://timestamp.apple.com/ts01
```

Binaries should be signed with the `hardened-runtime` flag is set or notarization will fail:

    relic sign -k devid -f foo-darwin-amd64 --hardened-runtime

Note also that relic currently does not support signing multi-arch ("fat") binaries, although it can verify them.
Sign each arch separately and then combine them afterwards:

    go install github.com/randall77/makefat@latest
    makefat foo foo-darwin-amd64 foo-darwin-arm64
    relic verify foo

The signed binary can then be placed into a regular zip file and uploaded for notarization.