Skip to content

Commit dd78211

Browse files
committed
Verify release signing by designated requirement, not Authority (self-signed certs have none)
1 parent 8ba811a commit dd78211

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,17 @@ jobs:
6363

6464
- name: Verify signing identity
6565
run: |
66-
codesign -dv build/BilingualSwitcher.app 2>&1 | grep -q 'Authority=BilingualSwitcher Dev' \
67-
|| { echo "ERROR: release not signed with BilingualSwitcher Dev"; exit 1; }
66+
# codesign -dv does not print Authority= lines for self-signed certs, so
67+
# check the designated requirement instead — it is what the Accessibility
68+
# TCC grant is keyed to.
69+
DR=$(codesign -dr - build/BilingualSwitcher.app 2>&1)
70+
if echo "$DR" | grep -q 'certificate leaf = H"b902cbab321847bd2493104dd0f1b102038d2d1f"'; then
71+
echo "OK: signed with BilingualSwitcher Dev"
72+
else
73+
SIG=$(codesign -dv build/BilingualSwitcher.app 2>&1 | tr '\n' ' ')
74+
echo "::error::NOT signed with BilingualSwitcher Dev. Signature: $SIG. DR: $(echo "$DR" | tr '\n' ' ')"
75+
exit 1
76+
fi
6877
6978
- name: Create DMG
7079
run: make dmg

0 commit comments

Comments
 (0)