diff options
author | Cameron Katri <me@cameronkatri.com> | 2022-06-16 10:17:00 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2022-06-16 10:21:50 -0400 |
commit | 9ef2c4a87d6fa816639b610313b67b98e983388a (patch) | |
tree | f3c5d259a3e0b87c5301ddf23b3185b4de9fbe9f /trustcache.h | |
parent | 6a5be2524f0d31a601687e8b5d09b9af92848dac (diff) | |
download | trustcache-main.tar.gz trustcache-main.tar.zst trustcache-main.zip |
Thanks to Linus Henze for reversing the new format
https://gist.github.com/LinusHenze/4cd5d7ef057a144cda7234e2c247c056
Diffstat (limited to 'trustcache.h')
-rw-r--r-- | trustcache.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/trustcache.h b/trustcache.h index 3b1696a..2ac1746 100644 --- a/trustcache.h +++ b/trustcache.h @@ -17,11 +17,18 @@ #include "machoparse/cs_blobs.h" #include "uuid/uuid.h" +struct trust_cache_entry2 { + uint8_t cdhash[CS_CDHASH_LEN]; + uint8_t hash_type; + uint8_t flags; + uint16_t category; +} __attribute__((__packed__)); + struct trust_cache_entry1 { uint8_t cdhash[CS_CDHASH_LEN]; uint8_t hash_type; uint8_t flags; -}; +} __attribute__((__packed__)); typedef uint8_t trust_cache_hash0[CS_CDHASH_LEN]; @@ -30,6 +37,7 @@ struct trust_cache { uuid_t uuid; uint32_t num_entries; union { + struct trust_cache_entry2 *entries2; struct trust_cache_entry1 *entries; trust_cache_hash0 *hashes; }; @@ -54,6 +62,7 @@ int hash_cmp(const void * vp1, const void * vp2); void print_header(struct trust_cache cache); void print_hash(uint8_t cdhash[CS_CDHASH_LEN], bool newline); void print_entry(struct trust_cache_entry1 entry); +void print_entry2(struct trust_cache_entry2 entry); void print_entries(struct trust_cache cache); #endif |