lib/rpmchecksig.c File Reference

Verify the signature of a package. More...

#include "system.h"
#include <rpmio_internal.h>
#include <rpmbc.h>
#include <rpmtag.h>
#include <rpmcli.h>
#include <rpmevr.h>
#include <rpmts.h>
#include "rpmdb.h"
#include "rpmgi.h"
#include <rpmxar.h>
#include <pkgio.h>
#include "signature.h"
#include "debug.h"
Include dependency graph for rpmchecksig.c:

Go to the source code of this file.

Defines

#define _RPMEVR_INTERNAL

Functions

static int manageFile (FD_t *fdp, const char **fnp, int flags, int rc)
static int copyFile (FD_t *sfdp, const char **sfnp, FD_t *tfdp, const char **tfnp)
 Copy header+payload, calculating digest(s) on the fly.
static int getSignid (Header sigh, int sigtag, unsigned char *signid)
 Retrieve signer fingerprint from an OpenPGP signature tag.
static int rpmReSign (rpmts ts, QVA_t qva, const char **argv)
 Create/modify elements in signature header.
rpmRC rpmcliImportPubkey (const rpmts ts, const unsigned char *pkt, ssize_t pktlen)
 Import public key packet(s).
static int rpmcliImportPubkeys (const rpmts ts, QVA_t qva, const char **argv)
 Import public key(s).
static rpmRC readFile (FD_t fd, const char *fn)
int rpmVerifySignatures (QVA_t qva, rpmts ts, FD_t fd, const char *fn)
 Check package and header signatures.
int rpmcliSign (rpmts ts, QVA_t qva, const char **argv)
 Create/Modify/Check elements from signature header.

Variables

int _print_pkts = 0

Detailed Description

Verify the signature of a package.

Definition in file rpmchecksig.c.


Define Documentation

#define _RPMEVR_INTERNAL

Definition at line 12 of file rpmchecksig.c.


Function Documentation

static int copyFile ( FD_t sfdp,
const char **  sfnp,
FD_t tfdp,
const char **  tfnp 
) [static]

Copy header+payload, calculating digest(s) on the fly.

Definition at line 93 of file rpmchecksig.c.

References _, Fflush(), Fread(), Fstrerror(), Fwrite(), manageFile(), rpmlog(), and RPMLOG_ERR.

Referenced by rpmReSign().

static int getSignid ( Header  sigh,
int  sigtag,
unsigned char *  signid 
) [static]

Retrieve signer fingerprint from an OpenPGP signature tag.

Parameters:
sigh signature header
sigtag signature tag
Return values:
signid signer fingerprint
Returns:
0 on success

Definition at line 142 of file rpmchecksig.c.

References _free(), alloca(), _HE_s::c, headerGet(), _HE_s::p, pgpDigFree(), pgpDigNew(), pgpPrtPkts(), rpmDataType_u::ptr, and _HE_s::tag.

Referenced by rpmReSign().

static int manageFile ( FD_t fdp,
const char **  fnp,
int  flags,
int  rc 
) [static]

Definition at line 36 of file rpmchecksig.c.

References _, Fclose(), fdFree, fdLink, Ferror(), Fopen(), Fstrerror(), rpmlog(), RPMLOG_ERR, and rpmTempFile().

Referenced by copyFile(), and rpmReSign().

static rpmRC readFile ( FD_t  fd,
const char *  fn 
) [static]
int rpmVerifySignatures ( QVA_t  qva,
rpmts  ts,
FD_t  fd,
const char *  fn 
)

Variable Documentation

int _print_pkts = 0

Definition at line 32 of file rpmchecksig.c.

Generated on Fri Feb 26 01:53:41 2010 for rpm by  doxygen 1.6.3