class Pliney::AppleCodeSignature::CodeDirectory

A CodeDirectory

Constants

COMPATABILITY_LIMIT
CURRENT_VERSION
EARLIEST_VERSION
HASHTYPES

Types of cryptographic digests (hashes) used to hold code signatures together.

Each combination of type, length, and other parameters is a separate hash type; we don't understand “families” here.

These type codes govern the digest links that connect a CodeDirectory to its subordinate data structures (code pages, resources, etc.) They do not directly control other uses of hashes (such as the hash-of-CodeDirectory identifiers used in requirements).

SUPPORTS_SCATTER

Attributes

codeLimit[R]
data[R]
flags[R]
hashOffset[R]
hashSize[R]
hashType[R]
identOffset[R]
nCodeSlots[R]
nSpecialSlots[R]
pageSize[R]
scatterOffset[R]
spare1[R]
spare2[R]
version[R]

Public Instance Methods

hash_type() click to toggle source
# File lib/pliney/apple_code_signature.rb, line 158
def hash_type
    HASHTYPES[@hashType] || :unknown
end
parse() click to toggle source
Calls superclass method Pliney::AppleCodeSignature::Blob#parse
# File lib/pliney/apple_code_signature.rb, line 135
def parse
    super() do
        @vers = @input.read_uint32
        @flags = @input.read_uint32
        @hashOffset = @input.read_uint32
        @identOffset = @input.read_uint32
        @nSpecialSlots = @input.read_uint32
        @nCodeSlots = @input.read_uint32
        @codeLimit = @input.read_uint32
        @hashSize = @input.read_uint8
        @hashType = @input.read_uint8
        @spare1 = @input.read_uint8
        @pageSize = @input.read_uint8
        @spare2 = @input.read_uint32
        @scatterOffset = @input.read_uint32
        @data = rest()
    end
end