Skip to content

Instantly share code, notes, and snippets.

View bhearsum's full-sized avatar

Ben Hearsum (he/him) bhearsum

View GitHub Profile
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=""
jwt-decode $JWT
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.developer.system-extension.install</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
Aki and I spent a ton of time trying to get this done today. We did manage to sign it, but it crashed on startup on Aki's laptop for reasons that aren't clear. Here's my best attempt at a recap what we did as cltbld@mac-v3-signing1:
* Baku provided a .pkg that was previously signed with a Distribution certificate.
* Hacked the scriptworker code to sign `Frameworks` and handle signing the embedded WireGuard app (more on that later):
```
diff --git a/iscript/src/iscript/mac.py b/iscript/src/iscript/mac.py
index 7bbc764..4aeb2bc 100644
--- a/iscript/src/iscript/mac.py
+++ b/iscript/src/iscript/mac.py
@@ -206,13 +206,14 @@ async def sign_app(key_config, app_path, entitlements_path):
IScriptError: on error.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Entitlements to apply to the .app bundle and main browser process
executable during codesigning of production channel builds.
-->
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>