Skip to content
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

requirements: correctly interpret apple cert requirements #39

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

jkt-signal
Copy link
Contributor

This change makes the inference of Designated Requirements from an Apple code-signing certificate chain more closely match the official Apple codesign tool:

  • certs signed with a "developer id application" CA add a requirement for a signature by such a CA, a requirement for the leaf cert to have a "developer id application" extension (which we only add if the leaf cert in use does indeed have that extension), and bind the OU found the leaf cert

  • certs signed with a "worldwide developer relations" CA (i.e., developer certificates) add a requirement for that CA extension, and bind the CN rather than the OU from the leaf cert

This is important because two binaries must have identical Designated Requirements in order to be considered the same application by macOS.

- certs signed with a "developer id application" CA add a requirement for a
signature by such a CA, a requirement for the leaf cert to have a "developer
id application" extension (which we only add if the leaf cert in use does
indeed have that extension), and bind the OU found the leaf cert

- certs signed with a "worldwide developer relations" CA (i.e., developer
certificates) add a requirement for that CA extension, and bind the CN rather
than the OU from the leaf cert
@blacktop
Copy link
Owner

I thought I remember seeing that apple is not using requirements anymore in favor or launch constraints ? Have you looked into that at all?

@jkt-signal
Copy link
Contributor Author

I am only vaguely aware of launch constraints, but designated requirements definitely exist in the applications we're signing with the official tooling today (and they don't have launch constraints).

@blacktop
Copy link
Owner

No worries, just thought I might get another great PR out of you for them if I asked ;)

@blacktop blacktop merged commit 80cfa86 into blacktop:master Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants