-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Wrong identifier used for nested bundles #149
Comments
I think this issue is related to your other issue (#148). It is likely there's a bug somewhere in bundle traversal that is causing things to get misidentified. Please provide more technical details so we can debug this. |
I'm going to call this a duplicate of #148 because the issues are intricately linked. |
Actually, this issue may be subtly different. |
Ok. I think I know what's happening. First, fuller logs:
In non-shallow signing mode, we enter the nested bundle and sign Then later on when signing the main bundle we sign I haven't verified this but I'm willing to bet that the second signing- which signs the Mach-O in the context of a regular Mach-O file and not the bundle's main executable - is setting the wrong identifier because of this fact. We have special logic that looks for nested bundles. But only if the
So essentially the I initially wanted to say the structure of this bundle is malformed and the nested bundle must exist in a different directory. But if Apple verifies/notarizes the bundle, then the bundle is seemingly correct. That's the test that matters. I haven't verified this, but I'm willing to bet that because the What we may need to do here is register nested bundles in an exclusion list as they are signed. Then when we go to sign the outer bundle, we ignore re-signing files we've seen before. I need to think about this a bit more before I author a code change. But I'm optimistic I understand what's happening. |
Confirmed that Apple's
So we need some mechanism to avoid signing entities that have already been signed as part of signing a child bundle. But we still need to capture those files in the parent's bundle. |
We may have a simular(or same) issue with nested bundles. We have a in-Unity web browser plugin, which file structure looks like:
So if I just try to sign it once for all from the top level, during the code sign, it will show message like:
And when notary, it will give "The signature of the binary is invalid." error for all the Mach-O file in the nested app, like below:
Forget to mention, we're trying to sign our application on Linux. I tried to manually notary the files on Mac, using the traditional way(sign the last level of nested apps first, then sign their parent, then the parent of parent), and this method works. |
@Yuuon aspects of your issue look to overlap with this issue. If you are able to run a build of the main branch and report feedback, it would be helpful. You can download rcodesign executables from GitHub Actions from the rcodesign workflow. If you still experience issues or can't test, please open a new issue and we can triage there. |
I can confirm that the current |
We have an application bundle that has another application bundle nested within it. rcodesign properly detects this, but it messes up the signature in a way that makes Apple reject the notarization:
The issue is the identifier used on the main binary for that nested bundle. It gets the generic one (
"vncviewer"
), rather than one of the bundle identifiers¹.The workaround is to sign the nested bundle separately (although #148 caused some friction there).
¹ Apple seems to accept either identifier from
ThinLinc Client Notarized.app
orvncviewer.app
The text was updated successfully, but these errors were encountered: