23#define MAX_SIGNATURES 8
73MarFile *mar_wopen(
const wchar_t *path);
137#define MAR_MAX_CERT_SIZE (16*1024)
154 const uint8_t * *data,
178 const uint8_t *
const *certData,
179 const uint32_t *certDataSizes,
struct MarItem_ MarItem
The MAR item data structure.
int mar_read(MarFile *mar, const MarItem *item, int offset, char *buf, int bufsize)
Read from MAR item at given offset up to bufsize bytes.
void mar_close(MarFile *mar)
Close a MAR file that was opened using mar_open.
MarFile * mar_open(const char *path)
Open a MAR file for reading.
int mar_read_entire_file(const char *filePath, uint32_t maxSize, const uint8_t **data, uint32_t *size)
int mar_enum_items(MarFile *mar, MarItemCallback callback, void *data)
Enumerate all MAR items via callback function.
int(* MarItemCallback)(MarFile *mar, const MarItem *item, void *data)
Signature of callback function passed to mar_enum_items.
int mar_extract(const char *path)
Extract a MAR file to the current working directory.
MOZ_STATIC_ASSERT(MAX_SIGNATURES<=9, "too many signatures")
int mar_verify_signatures(MarFile *mar, const uint8_t *const *certData, const uint32_t *certDataSizes, uint32_t certCount)
Verifies a MAR file by verifying each signature with the corresponding certificate.
int mar_read_product_info_block(MarFile *mar, struct ProductInformationBlock *infoBlock)
Reads the product info block from the MAR file's additional block section.
int mar_create(const char *dest, int numfiles, char **files, struct ProductInformationBlock *infoBlock)
Create a MAR file from a set of files.
const MarItem * mar_find_item(MarFile *mar, const char *item)
Find an item in the MAR file by name.
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
MarItem * item_table[TABLESIZE]
The MAR item data structure.