rpm
5.2.1
|
Methods to handle package elements. More...
#include <rpmpgp.h>
Go to the source code of this file.
Functions | |
rpmRC | headerCheck (pgpDig dig, const void *uh, size_t uc, const char **msg) |
Check header consistency, performing headerGetEntry() the hard way. More... | |
rpmRC | rpmReadPackageFile (rpmts ts, FD_t fd, const char *fn, Header *hdrp) |
Return package header from file handle, verifying digests/signatures. More... | |
size_t | rpmpkgSizeof (const char *fn, const void *ptr) |
Return size of item in bytes. More... | |
rpmRC | rpmpkgWrite (const char *fn, FD_t fd, void *ptr, const char **msg) |
Write item onto file descriptor. More... | |
rpmRC | rpmpkgRead (const char *fn, FD_t fd, void *ptr, const char **msg) |
Read item from file descriptor. More... | |
rpmRC | rpmpkgCheck (const char *fn, FD_t fd, const void *ptr, const char **msg) |
Verify item integrity. More... | |
Methods to handle package elements.
Definition in file pkgio.h.
Check header consistency, performing headerGetEntry() the hard way.
Sanity checks on the header are performed while looking for a header-only digest or signature to verify the blob. If found, the digest or signature is verified.
dig | signature parameters container |
uh | unloaded header blob |
uc | no. of bytes in blob (or 0 to disable) |
*msg | verification error message (or NULL) |
Check header consistency, performing headerGetEntry() the hard way.
Sanity checks on the header are performed while looking for a header-only digest or signature to verify the blob. If found, the digest or signature is verified.
dig | signature parameters container |
uh | unloaded header blob |
uc | no. of bytes in blob (or 0 to disable) |
*msg | signature verification msg |
Definition at line 921 of file pkgio.c.
References _, _free(), _pkgio_debug, _print_pkts, alloca(), entryInfo_s::count, headerGetMagic(), headerVerifyInfo(), indexEntry_s::info, entryInfo_s::offset, pgpDigVSFlags, pgpGetSig(), PGPHASHALGO_SHA1, pgpPrtPkts(), pgpSetSig(), pgpStatsAccumulator(), REGION_TAG_COUNT, RPM_BIN_TYPE, RPM_STRING_TYPE, RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmIsDebug, rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmswEnter(), rpmswExit(), RPMTAG_DSAHEADER, RPMTAG_HEADERIMMUTABLE, RPMTAG_RSAHEADER, RPMTAG_SHA1HEADER, rpmVerifySignature(), RPMVSF_NODSAHEADER, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, snprintf(), entryInfo_s::tag, entryInfo_s::type, vsflags, xmalloc(), and xstrdup().
Referenced by miFreeHeader(), rpmdbAdd(), rpmmiNext(), rpmReadHeader(), and rpmts_HdrCheck().
Verify item integrity.
fn | item name |
fd | file handle |
ptr | item buffer |
*msg | item check failure message |
Definition at line 1513 of file pkgio.c.
References ckHeader(), and RPMRC_FAIL.
Read item from file descriptor.
fn | item name |
fd | file handle |
*ptr | item buffer |
*msg | item check failure message |
Definition at line 1525 of file pkgio.c.
References rdHeader(), rdLead(), rdSignature(), and RPMRC_FAIL.
Referenced by makeHDRSignature(), readFile(), rpmgiNext(), rpmReadHeaders(), rpmReadPackageFile(), rpmReSign(), rpmSingleHeaderFromFD(), rpmVerifySignatures(), and writeRPM().
size_t rpmpkgSizeof | ( | const char * | fn, |
const void * | ptr | ||
) |
Return size of item in bytes.
fn | item name |
ptr | item buffer |
Definition at line 1497 of file pkgio.c.
References szHeader().
Referenced by printSize(), rpmpsmStage(), and writeRPM().
Write item onto file descriptor.
fn | item name |
fd | file handle |
ptr | item buffer |
*msg | item check failure message |
Definition at line 1543 of file pkgio.c.
References RPMRC_FAIL, wrHeader(), wrLead(), and wrSignature().
Referenced by makeHDRSignature(), rpmpsmStage(), rpmReSign(), rpmWriteHeaders(), and writeRPM().
Return package header from file handle, verifying digests/signatures.
ts | transaction set |
fd | file handle |
fn | file name |
hdrp | address of header (or NULL) |
Definition at line 80 of file package.c.
References _, _chk, _free(), _print_pkts, alloca(), _HE_s::c, rpmop_s::count, fdInitDigest(), fdSetDig(), fdstat_op(), FDSTAT_READ, fdStealDigest(), Fread(), Fstrerror(), headerFree(), headerGet(), headerGetMagic(), headerIsEntry(), headerLink(), headerMergeLegacySigs(), _HE_s::p, pgpDigVSFlags, PGPHASHALGO_MD5, PGPHASHALGO_SHA1, pgpPrtPkts(), pgpSetSig(), pgpStashKeyid(), pgpStatsAccumulator(), rpmDataType_u::ptr, RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmIsDebug, rpmlog(), RPMLOG_DEBUG, RPMLOG_ERR, RPMLOG_WARNING, rpmpkgRead(), RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, RPMSIGTAG_DSA, RPMSIGTAG_MD5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, rpmswAdd(), rpmswEnter(), rpmswExit(), rpmswSub(), RPMTAG_HEADERIMMUTABLE, RPMTS_OP_DIGEST, RPMTS_OP_READHDR, rpmtsCleanDig(), rpmtsDig(), rpmtsOp(), rpmVerifySignature(), RPMVSF_NEEDPAYLOAD, RPMVSF_NODSAHEADER, RPMVSF_NOMD5, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, _FD_s::stats, _HE_s::t, _HE_s::tag, and vsflags.
Referenced by IDTXglob(), main(), repoReadHeader(), rpmgiReadHeader(), rpmInstallSourcePackage(), rpmts_HdrFromFdno(), rpmtsRun(), and rpmtsSolve().