Skip to content

Commit

Permalink
64-bit Macos builds:
Browse files Browse the repository at this point in the history
Add the com.apple.security.cs.allow-unsigned-executable-memory entitlement,
and add the --timestamp & --options=runtime options to codesign to produce
a properyl signed, notarized timestamp & "hardened" runtime VM, needed for
10.14 and 11.x deployment.
  • Loading branch information
eliotmiranda committed Dec 5, 2020
1 parent f9281e7 commit c7b43b3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
6 changes: 4 additions & 2 deletions build.macos64ARMv8/common/Makefile.app
Expand Up @@ -198,8 +198,10 @@ signapp:
else
signapp:
rm -rf $(APP)/Contents/MacOS/*.cstemp
codesign -f --deep -s "$(SIGNING_IDENTITY)" \
--entitlements ../common/entitlements.plist $(APP)
codesign --force --deep -s "$(SIGNING_IDENTITY)" \
--timestamp --options=runtime \
--entitlements ../common/entitlements.plist \
$(APP)
endif

touchapp:
Expand Down
2 changes: 2 additions & 0 deletions build.macos64ARMv8/common/entitlements.plist
Expand Up @@ -6,6 +6,8 @@
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- Apparently this key allows an application to *be* a debugger,
not to be debugged
<key>com.apple.security.cs.debugger</key>
Expand Down
5 changes: 4 additions & 1 deletion build.macos64x64/common/Makefile.app
Expand Up @@ -198,7 +198,10 @@ signapp:
else
signapp:
rm -rf $(APP)/Contents/MacOS/*.cstemp
codesign -f --deep -s "$(SIGNING_IDENTITY)" $(APP)
codesign --force --deep -s "$(SIGNING_IDENTITY)" \
--timestamp --options=runtime \
--entitlements ../common/entitlements.plist \
$(APP)
endif

touchapp:
Expand Down
17 changes: 17 additions & 0 deletions build.macos64x64/common/entitlements.plist
@@ -0,0 +1,17 @@
<?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">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- Apparently this key allows an application to *be* a debugger,
not to be debugged
<key>com.apple.security.cs.debugger</key>
<true/>
-->
</dict>
</plist>

0 comments on commit c7b43b3

Please sign in to comment.