Files | |
file | digest.c |
file | rpmlib.h |
In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not. | |
file | rpmpgp.c |
Routines to handle RFC-2440 detached signatures. | |
file | signature.c |
file | signature.h |
Generate and verify signatures. | |
RPMK | |
enum | rpmtagSignature { RPMSIGTAG_SIZE = 1000, RPMSIGTAG_LEMD5_1 = 1001, RPMSIGTAG_PGP = 1002, RPMSIGTAG_LEMD5_2 = 1003, RPMSIGTAG_MD5 = 1004, RPMSIGTAG_GPG = 1005, RPMSIGTAG_PGP5 = 1006, RPMSIGTAG_PAYLOADSIZE = 1007, RPMSIGTAG_BADSHA1_1 = RPMTAG_BADSHA1_1, RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2, RPMSIGTAG_SHA1 = RPMTAG_SHA1HEADER, RPMSIGTAG_DSA = RPMTAG_DSAHEADER, RPMSIGTAG_RSA = RPMTAG_RSAHEADER } |
rpmRC | rpmVerifySignature (const rpmts ts, char *result) |
Header | rpmFreeSignature (Header h) |
Typedefs | |
typedef enum sigType_e | sigType |
typedef enum pgpVersion_e | pgpVersion |
Enumerations | |
enum | sigType_e { RPMSIGTYPE_HEADERSIG = 5 } |
enum | pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 } |
Functions | |
Header | rpmNewSignature (void) |
rpmRC | rpmReadSignature (FD_t fd, Header *sighp, sigType sig_type, const char **msg) |
int | rpmWriteSignature (FD_t fd, Header h) |
int | rpmAddSignature (Header sig, const char *file, int_32 sigTag, const char *passPhrase) |
int | rpmLookupSignatureType (int action) |
char * | rpmGetPassPhrase (const char *prompt, const int sigTag) |
const char * | rpmDetectPGPVersion (pgpVersion *pgpVer) |
|
Identify PGP versions.
Referenced by checkPassPhrase(), makePGPSignature(), and rpmDetectPGPVersion(). |
|
Signature types stored in rpm lead. Referenced by rpmReadSignature(). |
|
Identify PGP versions.
Definition at line 22 of file signature.h. |
|
Tags found in signature header from package.
|
|
Signature types stored in rpm lead. Definition at line 14 of file signature.h. |
|
Generate signature(s) from a header+payload file, save in signature header.
Definition at line 731 of file signature.c. References byte, domd5(), headerAddEntry(), int_32, makeGPGSignature(), makeHDRSignature(), makePGPSignature(), RPM_BIN_TYPE, RPM_INT32_TYPE, RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, and xcalloc(). Referenced by rpmReSign(), and writeRPM(). |
|
Return path to pgp executable of given type, or NULL when not found.
Definition at line 73 of file signature.c. References _free(), alloca(), PGP_2, PGP_5, PGP_NOTDETECTED, PGP_UNKNOWN, pgpVersion, rpmGetPath(), and stpcpy(). Referenced by checkPassPhrase(), main(), and makePGPSignature(). |
|
Destroy signature header from package.
Definition at line 364 of file signature.c. References headerFree(). Referenced by rpmpsmStage(), rpmReadPackageFile(), rpmReSign(), rpmVerifySignatures(), and writeRPM(). |
|
Read a pass phrase using getpass(3), confirm with gpg/pgp helper binaries.
Definition at line 895 of file signature.c. References _, _free(), checkPassPhrase(), RPMERR_SIGGEN, rpmError, rpmExpand(), RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, and RPMSIGTAG_RSA. Referenced by main(). |
|
Return type of signature needed for signing/building.
Definition at line 33 of file signature.c. References _free(), rpmExpand(), RPMLOOKUPSIG_DISABLE, RPMLOOKUPSIG_ENABLE, RPMLOOKUPSIG_QUERY, RPMSIGTAG_GPG, RPMSIGTAG_PGP, and xstrcasecmp(). Referenced by main(), rpmReSign(), and writeRPM(). |
|
Return new, empty (signature) header instance.
Definition at line 358 of file signature.c. References headerNew(). Referenced by headerRegenSigHeader(), and writeRPM(). |
|
Read (and verify header+payload size) signature header. If an old-style signature is found, we emulate a new style one.
Definition at line 148 of file signature.c. References _, alloca(), entryInfo_s::count, headerToken_s::flags, header_magic, HEADER_MAGIC_YES, HEADERFLAG_ALLOCATED, headerFree(), headerGetEntry(), headerLink(), headerLoad(), headerSizeof(), headerVerifyInfo(), indexEntry_s::info, int_32, entryInfo_s::offset, printSize(), REGION_TAG_COUNT, RPM_BIN_TYPE, rpmRC, RPMRC_FAIL, RPMRC_OK, RPMSIGTAG_SIZE, RPMSIGTYPE_HEADERSIG, RPMTAG_HEADERSIGNATURES, sigType, snprintf(), entryInfo_s::tag, timedRead, entryInfo_s::type, xmalloc(), and xstrdup(). Referenced by main(), rpmReadPackageFile(), rpmReSign(), and rpmVerifySignatures(). |
|
Verify a signature from a package. This needs the following variables from the transaction set:
Definition at line 1334 of file signature.c. References _, pgpDig_s::hdrsha1ctx, int_32, pgpDig_s::md5ctx, rpmRC, RPMRC_NOTFOUND, RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, rpmts, rpmtsDig(), rpmtsSig(), rpmtsSiglen(), rpmtsSigtag(), pgpDig_s::sha1ctx, verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), verifySHA1Signature(), and verifySizeSignature(). Referenced by headerCheck(), rpmReadPackageFile(), and rpmVerifySignatures(). |
|
Write signature header.
Definition at line 336 of file signature.c. References _, byte, Fwrite(), HEADER_MAGIC_YES, headerSizeof(), headerWrite(), RPMMESS_DEBUG, and rpmMessage. Referenced by main(), rpmpsmStage(), rpmReSign(), and writeRPM(). |