nextcloud-desktop/admin/osx/sign_app.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
568 B
Bash
Raw Normal View History

#!/bin/sh -xe
2014-09-02 18:13:37 +04:00
[ "$#" -lt 2 ] && echo "Usage: sign_app.sh <app> <identity> <team_identifier>" && exit
2014-09-02 18:13:37 +04:00
src_app="$1"
identity="$2"
team_identifier="$3"
2014-09-02 18:13:37 +04:00
codesign -s "$identity" --force --preserve-metadata=entitlements --verbose=4 --deep "$src_app"
2014-09-02 18:13:37 +04:00
# Verify the signature
2014-10-01 17:33:20 +04:00
codesign -dv $src_app
codesign --verify -v $src_app
spctl -a -t exec -vv $src_app
# Validate that the key used for signing the binary matches the expected TeamIdentifier
# needed to pass the SocketApi through the sandbox
codesign -dv $src_app 2>&1 | grep "TeamIdentifier=$team_identifier"
exit $?