Struct tugger_apple_codesign::EmbeddedSignature[][src]

pub struct EmbeddedSignature<'a> {
    pub magic: CodeSigningMagic,
    pub length: u32,
    pub count: u32,
    pub data: &'a [u8],
    pub blobs: Vec<BlobEntry<'a>>,
}
Expand description

Represents embedded signature data in a Mach-O binary.

This type represents a lightly parsed SuperBlob with CodeSigningMagic::EmbeddedSignature embedded in a Mach-O binary. It is the most common embedded signature data format you are likely to encounter.

Fields

magic: CodeSigningMagic

Magic value from header.

length: u32

Length of this super blob.

count: u32

Number of blobs in this super blob.

data: &'a [u8]

Raw data backing this super blob.

blobs: Vec<BlobEntry<'a>>

All the blobs within this super blob.

Implementations

Attempt to parse an embedded signature super blob from data.

The argument to this function is likely the subset of the __LINKEDIT Mach-O section that the LC_CODE_SIGNATURE load instructions points it.

Find the first occurrence of the specified slot.

Attempt to resolve a parsed CodeDirectoryBlob for this signature data.

Returns Err on data parsing error or if the blob slot didn’t contain a code directory.

Returns Ok(None) if there is no code directory slot.

Attempt to resolve a parsed EntitlementsBlob for this signature data.

Returns Err on data parsing error or if the blob slot didn’t contain an entitlments blob.

Returns Ok(None) if there is no entitlements slot.

Attempt to resolve a parsed RequirementSetBlob for this signature data.

Returns Err on data parsing error or if the blob slot didn’t contain a requirements blob.

Returns Ok(None) if there is no requirements slot.

Attempt to resolve raw CMS signature data.

The returned data is likely DER PKCS#7 with the root object pkcs7-signedData (1.2.840.113549.1.7.2).

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.