Function SecCodeValidateFileResource

Source
pub unsafe extern "C-unwind" fn SecCodeValidateFileResource(
    code: &SecStaticCode,
    relative_path: &CFString,
    file_data: &CFData,
    flags: SecCSFlags,
) -> i32
Available on crate features SecCode and CSCommon only.
Expand description

For a SecStaticCodeRef, check that a given CFData object faithfully represents a plain-file resource in its resource seal. This call will fail if the file is missing in the bundle, even if it is optional.

Parameter code: A code or StaticCode object.

Parameter relativePath: A CFStringRef containing the relative path to a sealed resource file. This path is relative to the resource base, which is either Contents or the bundle root, depending on bundle format.

Parameter fileData: A CFDataRef containing the exact contents of that resource file.

Parameter flags: Pass kSecCSDefaultFlags.

Returns: noErr if fileData is the exact content of the file at relativePath at the time it was signed. Various error codes if it is different, there was no such file, it was not a plain file, or anything is irregular.