Function tugger_apple_codesign::check_signing_capability[][src]

pub fn check_signing_capability(
    macho: &MachO<'_>
) -> Result<(), AppleCodesignError>

Determines whether this crate is capable of signing a given Mach-O binary.

Code in this crate is limited in the amount of Mach-O binary manipulation it can perform (supporting rewriting all valid Mach-O binaries effectively requires low-level awareness of all Mach-O constructs in order to perform offset manipulation). This function can be used to test signing compatibility.

We currently only support signing Mach-O files already containing an embedded signature. Often linked binaries automatically contain an embedded signature containing just the code directory (without a cryptographically signed signature), so this limitation hopefully isn’t impactful.