-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codesign fixes and notarization support #307
Conversation
Fixes both having no entitlements file and signing the wrong path in `codesign` fixes fvarrui#306
Also rework codesigning to follow the same pattern as jpackage, which matches the official guidelines of only explicitly signing executable code (dylibs and executables), properly wrapping the jdk in a macOS bundle, and only attaching entitlements/hardened runtime to executables. This combination of changes ensures that signing works even without preserving filesystem extended attributes, as tends to happen when zipping application bundles, because Mach-O files have signatures embedded in the file contents whereas all other file types have their signatures stored in FS extended attributes. (Non-code files do get signed, but only through the manifest on the bundle itself so the file doesn't need modification.) This has been tested on a clean macOS 13.2.1 VM that has gatekeeper using its default settings. The VM was disconnected from the internet after downloading to validate the notarization and stapling. The user is prompted to confirm opening an application that came from the internet, as one is with any properly signed and notarized application that was downloaded from the internet. fixes fvarrui#286
Hi @maths22! |
Dear guys, |
Hi @treimers!!! |
Hi @fvarrui, |
Ok, it helped with our problem under Mac OS Catalina with error:
Thank you very much guys! I am getting several error message during build
Maybe ERROR in the output means that the message is written to "stderr"? Do you get these messages also? But good news are that it is working finally. Thanks! |
Best I can tell, |
Ah ok, thanks. I did understand now that [ERROR] is the log level. So these warnings are written with level "error". |
Fixes both having no entitlements file and signing the wrong path
in
codesign
.Add support for notarization.
Also rework codesigning to follow the same pattern as jpackage,
which matches the official guidelines of only explicitly signing
executable code (dylibs and executables), properly wrapping the jdk
in a macOS bundle, and only attaching entitlements/hardened runtime
to executables. This combination of changes ensures that signing
works even without preserving filesystem extended attributes, as
tends to happen when zipping application bundles, because Mach-O
files have signatures embedded in the file contents whereas all
other file types have their signatures stored in FS extended
attributes. (Non-code files do get signed, but only through the
manifest on the bundle itself so the file doesn't need
modification.)
This has been tested on a clean macOS 13.2.1 VM that has gatekeeper
using its default settings. The VM was disconnected from the
internet after downloading to validate the notarization and
stapling. The user is prompted to confirm opening an application
that came from the internet, as one is with any properly signed
and notarized application that was downloaded from the internet.
fixes #306
fixes #286