#include "system.h"
#include "rpmio_internal.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include "md5.h"
#include "misc.h"
#include "rpmlead.h"
#include "signature.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | X(_x) (unsigned)((_x) & 0xff) |
Typedefs | |
typedef int(* | md5func )(const char *fn, byte *digest) |
Functions | |
int | rpmLookupSignatureType (int action) |
Return type of signature in effect for building. | |
const char * | rpmDetectPGPVersion (pgpVersion *pgpVer) |
Return path to pgp executable of given type, or NULL when not found. | |
static rpmRC | checkSize (FD_t fd, int siglen, int pad, int datalen) |
Check package size. | |
rpmRC | rpmReadSignature (FD_t fd, Header *headerp, sigType sig_type) |
Read (and verify header+archive size) signature header. | |
int | rpmWriteSignature (FD_t fd, Header h) |
Write signature header. | |
Header | rpmNewSignature (void) |
Return new, empty (signature) header instance. | |
Header | rpmFreeSignature (Header h) |
Destroy signature header from package. | |
static int | makePGPSignature (const char *file, void **sig, int_32 *size, const char *passPhrase) |
static int | makeGPGSignature (const char *file, void **sig, int_32 *size, const char *passPhrase) |
int | rpmAddSignature (Header h, const char *file, int_32 sigTag, const char *passPhrase) |
Generate a signature of data in file, insert in header. | |
static rpmVerifySignatureReturn | verifySizeSignature (const char *datafile, int_32 size, char *result) |
static rpmVerifySignatureReturn | verifyMD5Signature (const char *datafile, const byte *sig, char *result, md5func fn) |
static rpmVerifySignatureReturn | verifyPGPSignature (const char *datafile, const void *sig, int count, char *result) |
static rpmVerifySignatureReturn | verifyGPGSignature (const char *datafile, const void *sig, int count, char *result) |
static int | checkPassPhrase (const char *passPhrase, const int sigTag) |
char * | rpmGetPassPhrase (const char *prompt, const int sigTag) |
Read a pass phrase from the user. | |
rpmVerifySignatureReturn | rpmVerifySignature (const char *file, int_32 sigTag, const void *sig, int count, char *result) |
Verify a signature from a package. |
Definition in file signature.c.
#define X | ( | _x | ) | (unsigned)((_x) & 0xff) |
Definition at line 504 of file signature.c.
typedef int(* md5func)(const char *fn,byte *digest) |
Definition at line 33 of file signature.c.
static int checkPassPhrase | ( | const char * | passPhrase, | |
const int | sigTag | |||
) | [static] |
Definition at line 775 of file signature.c.
Check package size.
fd | package file handle | |
siglen | signature header size | |
pad | signature padding | |
datalen | length of header+payload |
Definition at line 115 of file signature.c.
static int makeGPGSignature | ( | const char * | file, | |
void ** | sig, | |||
int_32 * | size, | |||
const char * | passPhrase | |||
) | [static] |
Definition at line 357 of file signature.c.
static int makePGPSignature | ( | const char * | file, | |
void ** | sig, | |||
int_32 * | size, | |||
const char * | passPhrase | |||
) | [static] |
Definition at line 245 of file signature.c.
static rpmVerifySignatureReturn verifyGPGSignature | ( | const char * | datafile, | |
const void * | sig, | |||
int | count, | |||
char * | result | |||
) | [static] |
Definition at line 685 of file signature.c.
static rpmVerifySignatureReturn verifyMD5Signature | ( | const char * | datafile, | |
const byte * | sig, | |||
char * | result, | |||
md5func | fn | |||
) | [static] |
Definition at line 507 of file signature.c.
static rpmVerifySignatureReturn verifyPGPSignature | ( | const char * | datafile, | |
const void * | sig, | |||
int | count, | |||
char * | result | |||
) | [static] |
Definition at line 544 of file signature.c.
static rpmVerifySignatureReturn verifySizeSignature | ( | const char * | datafile, | |
int_32 | size, | |||
char * | result | |||
) | [static] |
Definition at line 486 of file signature.c.