Skip to content

Conversation

jtschuster
Copy link
Member

In dotnet/runtime#108992, we added a managed ad-hoc signer that's used in HostWriter.CreateAppHost. This PR enables it to be used in the sdk when publishing for osx on non-Mac hosts so that developers can distribute an ad-hoc signed binary without using a Mac.

Tests on all platforms ensure that there is a load command with the LC_CODE_SIGNATURE command type in the Mach-O binary. On MacOS, codesign is used to fully validate the signature in addition.

@ghost ghost added the untriaged Request triage from a team member label Nov 21, 2024
@ghost
Copy link

ghost commented Nov 21, 2024

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

1 similar comment
@ghost
Copy link

ghost commented Nov 21, 2024

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

}

// Reads the Mach-O load commands and returns true if an LC_CODE_SIGNATURE command is found, otherwise returns false
static bool HasMachOSignatureLoadCommand(FileInfo file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter for this change, but we may want this in a shared test helper so that we can add cross-platform checks for single-file publish with signing after dotnet/runtime#110417 goes in.

@jtschuster
Copy link
Member Author

/ba-g test failures are all known

@jtschuster jtschuster merged commit abe7d29 into dotnet:main Jan 2, 2025
35 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Host untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants