rpm
5.4.14
|
Verify the signature of a package. More...
#include "system.h"
#include <rpmio_internal.h>
#include <poptIO.h>
#include <rpmbc.h>
#include <rpmhkp.h>
#include <rpmtag.h>
#include <rpmtypes.h>
#include <rpmevr.h>
#include <rpmdb.h>
#include <rpmtxn.h>
#include <rpmxar.h>
#include <pkgio.h>
#include "signature.h"
#include <rpmts.h>
#include "rpmgi.h"
#include <rpmversion.h>
#include <rpmcli.h>
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _RPMHKP_INTERNAL /* XXX internal prototypes. */ |
#define | _RPMEVR_INTERNAL /* XXX RPMSENSE_KEYRING */ |
#define | _RPMDB_INTERNAL /* XXX db_txn */ |
#define | _RPMTS_INTERNAL /* XXX ts->hkp */ |
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. More... | |
static int | getSignid (Header sigh, rpmSigTag sigtag, unsigned char *signid) |
Retrieve signer fingerprint from an OpenPGP signature tag. More... | |
static int | rpmReSign (rpmts ts, QVA_t qva, const char **argv) |
Create/modify elements in signature header. More... | |
rpmRC | rpmcliImportPubkey (const rpmts ts, const unsigned char *pkt, ssize_t pktlen) |
Import public key packet(s). More... | |
static int | rpmcliImportPubkeys (const rpmts ts, QVA_t qva, const char **argv) |
Import public key(s). More... | |
static rpmRC | readFile (FD_t fd, const char *fn) |
int | rpmVerifySignatures (QVA_t qva, rpmts ts, void *_fd, const char *fn) |
Check package and header signatures. More... | |
int | rpmcliSign (rpmts ts, QVA_t qva, const char **argv) |
Create/Modify/Check elements from signature header. More... | |
Variables | |
int | _print_pkts = 0 |
Verify the signature of a package.
Definition in file rpmchecksig.c.
#define _RPMDB_INTERNAL /* XXX db_txn */ |
Definition at line 19 of file rpmchecksig.c.
#define _RPMEVR_INTERNAL /* XXX RPMSENSE_KEYRING */ |
Definition at line 17 of file rpmchecksig.c.
#define _RPMHKP_INTERNAL /* XXX internal prototypes. */ |
Definition at line 12 of file rpmchecksig.c.
#define _RPMTS_INTERNAL /* XXX ts->hkp */ |
Definition at line 26 of file rpmchecksig.c.
Copy header+payload, calculating digest(s) on the fly.
Definition at line 110 of file rpmchecksig.c.
References _, buf, count, exit, Fflush(), Fread(), Fstrerror(), Fwrite(), manageFile(), NULL, rc, rpmlog(), RPMLOG_ERR, and void.
Referenced by rpmReSign().
Retrieve signer fingerprint from an OpenPGP signature tag.
sigh | signature header |
sigtag | signature tag |
signid | signer fingerprint |
Definition at line 159 of file rpmchecksig.c.
References _free(), alloca(), _HE_s::c, dig, headerGet(), memset(), NULL, _HE_s::p, pgpDigFree(), pgpDigNew(), pgpPktLen(), PGPPUBKEYALGO_UNKNOWN, rpmDataType_u::ptr, rc, RPMVSF_DEFAULT, _HE_s::tag, rpmDataType_u::ui8p, void, and xx.
Referenced by rpmReSign().
Definition at line 51 of file rpmchecksig.c.
References _, Fclose(), fd, fdFree(), fdLink(), Ferror(), fn, Fopen(), Fstrerror(), NULL, rpmlog(), RPMLOG_ERR, rpmTempFile(), and void.
Referenced by copyFile(), and rpmReSign().
Definition at line 934 of file rpmchecksig.c.
References _, _free(), alloca(), rpmDataType_u::argv, buf, _HE_s::c, count, dig, exit, fdGetDig(), fdGetXAR(), fdStealDigest(), Ferror(), Fread(), Fstrerror(), h, headerFree, headerGet(), headerGetMagic(), headerIsEntry(), headerSizeof(), ix, memset(), msg, NULL, _HE_s::p, PGPARMOR_PUBKEY, pgpArmorUnwrap(), PGPHASHALGO_SHA1, rpmDataType_u::ptr, rc, RPM_STRING_ARRAY_TYPE, RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), rpmlog(), RPMLOG_ERR, rpmpkgRead(), RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, RPMTAG_HEADERIMMUTABLE, RPMTAG_PUBKEYS, rpmxarNext(), rpmxarPull(), _HE_s::t, _HE_s::tag, void, and xx.
Referenced by rpmVerifySignatures().
Check package and header signatures.
qva | parsed query/verify options |
ts | transaction set |
_fd | package file handle |
fn | package file name |
Definition at line 1044 of file rpmchecksig.c.
References _, _free(), alloca(), assert(), b, buf, _HE_s::c, dig, exit, fd, fdInitDigest(), fdSetDig(), headerFini(), headerFree, headerGet(), headerInit(), headerIsEntry(), headerNext(), m, memset(), msg, NULL, _HE_s::p, pgpDigClean(), pgpGetSignature(), PGPHASHALGO_MD5, pgpPktLen(), pgpSetSig(), rpmDataType_u::ptr, rpmQVKArguments_s::qva_flags, rc, readFile(), res, result, rpmIsVerbose, rpmlog(), RPMLOG_ERR, RPMLOG_NOTICE, rpmpkgRead(), RPMRC_OK, RPMSIGTAG_DSA, RPMSIGTAG_MD5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, rpmtsCleanDig(), rpmtsDig(), rpmVerifySignature(), sigp, sprintf(), stpcpy(), _HE_s::t, _HE_s::tag, u, rpmDataType_u::ui8p, VERIFY_DIGEST, VERIFY_SIGNATURE, void, and xx.
Referenced by rpmcliSign().
int _print_pkts = 0 |
Definition at line 47 of file rpmchecksig.c.