VirtualBox

Changeset 74726 in vbox for trunk/include/iprt/crypto


Ignore:
Timestamp:
Oct 9, 2018 9:06:46 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
125654
Message:

IPRT/ldr: More hacking Mach-O code signatures. bugref:9232

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/applecodesign.h

    r74721 r74726  
    6363 *       greater-than and less-than comparisons works correctly.
    6464 * @{  */
     65#define RTCRAPLCS_VER_2_0                               UINT32_C(0x00020000)
    6566#define RTCRAPLCS_VER_SUPPORTS_SCATTER                  UINT32_C(0x00020100)
    6667#define RTCRAPLCS_VER_SUPPORTS_TEAMID                   UINT32_C(0x00020200)
     68#define RTCRAPLCS_VER_SUPPORTS_CODE_LIMIT_64            UINT32_C(0x00020300)
     69#define RTCRAPLCS_VER_SUPPORTS_EXEC_SEG                 UINT32_C(0x00020400)
    6770/** @} */
    6871
     
    7881#define RTCRAPLCS_SLOT_ALTERNATE_CODEDIRECTORIES        RT_N2H_U32_C(UINT32_C(0x00001000))
    7982#define RTCRAPLCS_SLOT_ALTERNATE_CODEDIRECTORIES_END    RT_N2H_U32_C(UINT32_C(0x00001005))
     83#define RTCRAPLCS_SLOT_ALTERNATE_CODEDIRECTORIES_COUNT  UINT32_C(0x00000005)
    8084#define RTCRAPLCS_SLOT_ALTERNATE_CODEDIRECTORY_INC      RT_N2H_U32_C(UINT32_C(0x00000001))
    8185/** The signature.
     
    162166    /** 0x0c: Flags & mode, RTCRAPLCS_???.  (Big endian. ) */
    163167    uint32_t        fFlags;
    164     /** 0x10: Offset of the hash slots.  Big endian. */
     168    /** 0x10: Offset of the hash slots.  Big endian.
     169     * Special slots found below this offset, code slots at and after.  */
    165170    uint32_t        offHashSlots;
    166171    /** 0x14: Offset of the identifier string.  Big endian. */
     
    170175    /** 0x1c: Number of code hash slots.  Big endian. */
    171176    uint32_t        cCodeSlots;
    172     /** 0x20: Number of bytes of code that's covered.  Big endian. */
    173     uint32_t        cbCodeLimit;
     177    /** 0x20: Number of bytes of code that's covered, 32-bit wide.  Big endian. */
     178    uint32_t        cbCodeLimit32;
    174179    /** 0x24: The hash size. */
    175180    uint8_t         cbHash;
     
    181186    uint8_t         cPageShift;
    182187    /** 0x28: Spare field, MBZ. */
    183     uint32_t        uUnused;
     188    uint32_t        uUnused1;
    184189    /** 0x2c: Offset of scatter vector (optional).  Big endian.
    185190     * @since RTCRAPLCS_VER_SUPPORTS_SCATTER */
    186191    uint32_t        offScatter;
    187192    /** 0x30: Offset of team identifier (optional).  Big endian.
    188      * @since RTCRAPLCS_VER_SUPPORTS_TEAM */
    189     uint32_t        offTeam;
     193     * @since RTCRAPLCS_VER_SUPPORTS_TEAMID */
     194    uint32_t        offTeamId;
     195    /** 0x34: Unused field, MBZ.
     196     * @since RTCRAPLCS_VER_SUPPORTS_CODE_LIMIT_64 */
     197    uint32_t        uUnused2;
     198    /** 0x38: Number of bytes of code that's covered, 64-bit wide.  Big endian.
     199     * @since RTCRAPLCS_VER_SUPPORTS_CODE_LIMIT_64 */
     200    uint64_t        cbCodeLimit64;
     201    /** 0x40: File offset of the first segment.  Big endian.
     202     * @since RTCRAPLCS_VER_SUPPORTS_EXEC_SEG
     203     * @note  Would be better to just sign the exe header + load commands. */
     204    uint64_t        offExecSeg;
     205    /** 0x48: The size of the first segment.  Big endian.
     206     * @since RTCRAPLCS_VER_SUPPORTS_EXEC_SEG */
     207    uint64_t        cbExecSeg;
     208    /** 0x50: Flags for the first segment.  Big endian.
     209     * @since RTCRAPLCS_VER_SUPPORTS_EXEC_SEG */
     210    uint64_t        fExecSeg;
    190211} RTCRAPLCSCODEDIRECTORY;
    191 AssertCompileSize(RTCRAPLCSCODEDIRECTORY, 0x34);
     212AssertCompileSize(RTCRAPLCSCODEDIRECTORY, 0x58);
    192213/** Pointer to a CS code directory. */
    193214typedef RTCRAPLCSCODEDIRECTORY *PRTCRAPLCSCODEDIRECTORY;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette