LibreOffice Module onlineupdate (master) 1
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <onlineupdate/mar.h>
#include <onlineupdate/mar_cmdline.h>
#include <unistd.h>
#include <errno.h>
#include "cert.h"
#include "pk11pub.h"
Go to the source code of this file.
Macros | |
#define | MAR_CHANNEL_ID |
Functions | |
int | NSSInitCryptoContext (const char *NSSConfigDir) |
Initializes the NSS context. More... | |
int | mar_repackage_and_sign (const char *NSSConfigDir, const char *const *certNames, uint32_t certCount, const char *src, const char *dest) |
Writes out a copy of the MAR at src but with embedded signatures. More... | |
static void | print_version (void) |
static void | print_usage (void) |
static int | mar_test_callback (MarFile *mar, const MarItem *item, void *unused) |
static int | mar_test (const char *path) |
int | main (int argc, char **argv) |
#define MAR_CHANNEL_ID |
Definition at line 126 of file mar.c.
References extract_signature(), FILE, get_mar_file_info(), import_signature(), MAR_CHANNEL_ID, mar_close(), mar_create(), mar_extract(), MAR_MAX_CERT_SIZE, mar_open(), mar_read_entire_file(), mar_repackage_and_sign(), mar_test(), mar_verify_signatures(), ProductInformationBlock::MARChannelID, MAX_SIGNATURES, NSSInitCryptoContext(), NULL, print_usage(), print_version(), ProductInformationBlock::productVersion, read_product_info_block(), refresh_product_info_block(), and strip_signature_block().
int mar_repackage_and_sign | ( | const char * | NSSConfigDir, |
const char *const * | certNames, | ||
uint32_t | certCount, | ||
const char * | src, | ||
const char * | dest | ||
) |
Writes out a copy of the MAR at src but with embedded signatures.
The passed in MAR file must not already be signed or an error will be returned.
NSSConfigDir | The NSS directory containing the private key for signing |
certNames | The nicknames of the certificate to use for signing |
certCount | The number of certificate names contained in certNames. One signature will be produced for each certificate. |
src | The path of the source MAR file to sign |
dest | The path of the MAR file to write out that is signed |
Definition at line 818 of file mar_sign.c.
References AdjustIndexContentOffsets(), BLOCKSIZE, FILE, get_mar_file_info(), HOST_TO_NETWORK64, htonl(), i, MAR_ID_SIZE, MAX_SIGNATURES, MAX_SIZE_OF_MAR_FILE, NETWORK_TO_HOST64, NSSInitCryptoContext(), NSSSignBegin(), ntohl(), NULL, ReadWriteAndUpdateSignatures(), remove(), SECU_GetModulePassword(), and WriteAndUpdateSignatures().
Referenced by main().
|
static |
Definition at line 112 of file mar.c.
References mar_close(), mar_enum_items(), mar_open(), mar_test_callback(), and NULL.
Referenced by main().
Definition at line 103 of file mar.c.
References MarItem_::flags, MarItem_::length, and MarItem_::name.
Referenced by mar_test().
int NSSInitCryptoContext | ( | const char * | NSSConfigDir | ) |
Initializes the NSS context.
NSSConfigDir | The config dir containing the private key to use |
Definition at line 35 of file mar_sign.c.
Referenced by main(), and mar_repackage_and_sign().
|
static |
|
static |