LibreOffice Module onlineupdate (master) 1
mar_cmdline.h
Go to the documentation of this file.
1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5#ifndef MAR_CMDLINE_H__
6#define MAR_CMDLINE_H__
7
8/* We use NSPR here just to import the definition of uint32_t */
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15
34int get_mar_file_info(const char *path,
35 int *hasSignatureBlock,
36 uint32_t *numSignatures,
37 int *hasAdditionalBlocks,
38 uint32_t *offsetAdditionalBlocks,
39 uint32_t *numAdditionalBlocks);
40
49int
51 struct ProductInformationBlock *infoBlock);
52
62int
63refresh_product_info_block(const char *path,
64 struct ProductInformationBlock *infoBlock);
65
75int
76strip_signature_block(const char *src, const char * dest);
77
87int
88extract_signature(const char *src, uint32_t sigIndex, const char * dest);
89
100int
101import_signature(const char *src,
102 uint32_t sigIndex,
103 const char * base64SigFile,
104 const char *dest);
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* MAR_CMDLINE_H__ */
int get_mar_file_info(const char *path, int *hasSignatureBlock, uint32_t *numSignatures, int *hasAdditionalBlocks, uint32_t *offsetAdditionalBlocks, uint32_t *numAdditionalBlocks)
Determines MAR file information.
Definition: mar_read.c:551
int import_signature(const char *src, uint32_t sigIndex, const char *base64SigFile, const char *dest)
Imports a base64 encoded signature into a MAR file.
Definition: mar_sign.c:605
int extract_signature(const char *src, uint32_t sigIndex, const char *dest)
Extracts a signature from a MAR file, base64 encodes it, and writes it out.
Definition: mar_sign.c:489
int read_product_info_block(char *path, struct ProductInformationBlock *infoBlock)
Reads the product info block from the MAR file's additional block section.
Definition: mar_read.c:369
int refresh_product_info_block(const char *path, struct ProductInformationBlock *infoBlock)
Refreshes the product information block with the new information.
Definition: mar_create.c:193
int strip_signature_block(const char *src, const char *dest)
Writes out a copy of the MAR at src but with the signature block stripped.
Definition: mar_sign.c:255