-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/link: keep MacOS binaries compatible with Apple Notary #31918
Comments
Milestone should be 1.14 (unless there is a milestone for "every release"). I opened this at request of @ianlancetaylor. |
My team used this basic fix, to change the constants as cited, with a binary that was later submitted to Apple Notary and it worked with flying colors. The Certification is officially stapled to our application. I believe this should satisfy the "NeedsInvestigation" portion of this issue. |
So what's the specific action item we should do for each release? Check that "See also" page and make sure it still says "10.9"? |
@randall77 are you asking me? Do you mean what action should you take to ensure binaries can be Notary-certified? |
I'm asking anyone who might know. Actually getting something notarized would certainly be a good test. That seems hard though. You need to sign a binary, have a valid Apple developer ID, etc. I'm wondering about the simpler problem of this issue - how will we know when Apple changes the minimum version from 10.9 to something larger? Is there a canonical reference we can check? |
According to my associate, enrollment in the Apple developer program costs $100. It seems to include both a login to notarize and a codesign certificate. |
You need to be enrolled as an Apple Developer to be able to notarize your app. Additionally, there is quite a bit of setup needed to get notarization up and running. The notarization process is also rather tricky as it's an async thing. You need to submit your app after building to the notarization service. You then need to poll for the status to see if it gets notarized or not (which takes anywhere from seconds to several minutes). If the notarization fails, you need to parse the output, download a log, parse that again to figure out what is wrong. My guess is that checking if the required SDK version is 10.9 should be what needs to be checked. I'm not sure if this minimum requirement is going to change anytime soon though. |
This comment has been minimized.
This comment has been minimized.
If it helps create a reproducable workflow or test, here's a script in use that signs a go binary, packages in dmg, then signs and notorizes the dmg via the CLI. https://github.com/99designs/aws-vault/blob/master/bin/create-dmg |
@andybons Are there any linker changes needed here? Let me know if I can help. |
As we need to notarize every toolchain release and all toolchain binaries except for the Closing as binaries created by the current toolchain have the correct Mach-O header values for notarization. If new problems arise, we’ll create a new issue for them. Thanks |
Review this before each release, as the required SDK value will eventually change.
The minimum SDK is given by a pair of constant expressions, last seen at:
https://github.com/golang/go/tree/master/src/cmd/link/internal/ld/macho.go#L418
See also https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution/resolving_common_notarization_issues
Originally raised in #30488
The text was updated successfully, but these errors were encountered: