Files | |
file | rpmlib.h |
file | signature.c |
file | signature.h |
Generate and verify signatures. | |
file | digest.c |
file | rpmpgp.c |
Routines to handle RFC-2440 detached 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 } |
Tags found in signature header from package. More... | |
rpmVerifySignatureReturn | rpmVerifySignature (const char *file, int_32 sigTag, const void *sig, int count, char *result) |
Verify a signature from a package. | |
Header | rpmFreeSignature (Header h) |
Destroy signature header from package. | |
Typedefs | |
typedef enum sigType_e | sigType |
Signature types stored in rpm lead. | |
typedef enum pgpVersion_e | pgpVersion |
Identify PGP versions. | |
Enumerations | |
enum | sigType_e { RPMSIGTYPE_NONE = 0, RPMSIGTYPE_PGP262_1024 = 1, RPMSIGTYPE_BAD = 2, RPMSIGTYPE_MD5 = 3, RPMSIGTYPE_MD5_PGP = 4, RPMSIGTYPE_HEADERSIG = 5, RPMSIGTYPE_DISABLE = 6 } |
Signature types stored in rpm lead. More... | |
enum | pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 } |
Identify PGP versions. More... | |
Functions | |
Header | rpmNewSignature (void) |
Return new, empty (signature) header instance. | |
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. | |
int | rpmAddSignature (Header h, const char *file, int_32 sigTag, const char *passPhrase) |
Generate a signature of data in file, insert in header. | |
int | rpmLookupSignatureType (int action) |
Return type of signature in effect for building. | |
char * | rpmGetPassPhrase (const char *prompt, const int sigTag) |
Read a pass phrase from the user. | |
const char * | rpmDetectPGPVersion (pgpVersion *pgpVer) |
Return path to pgp executable of given type, or NULL when not found. |
|
Identify PGP versions.
|
|
Signature types stored in rpm lead.
|
|
Identify PGP versions.
Definition at line 30 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 a signature of data in file, insert in header.
Definition at line 446 of file signature.c. References _, headerAddEntry(), makeGPGSignature(), makePGPSignature(), mdbinfile(), RPM_BIN_TYPE, RPM_INT32_TYPE, RPMMESS_VERBOSE, rpmMessage, RPMSIGTAG_GPG, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, and RPMSIGTAG_SIZE. Referenced by rpmReSign(), and writeRPM(). |
|
Return path to pgp executable of given type, or NULL when not found.
Definition at line 72 of file signature.c. References _free(), alloca(), PGP_2, PGP_5, PGP_NOTDETECTED, PGP_UNKNOWN, rpmGetPath(), and stpcpy(). Referenced by checkPassPhrase(), main(), makePGPSignature(), and verifyPGPSignature(). |
|
Destroy signature header from package.
Definition at line 240 of file signature.c. References headerFree(). Referenced by psmStage(), readPackageHeaders(), rpmReadPackageHeader(), rpmReSign(), and writeRPM(). |
|
Read a pass phrase from the user.
Definition at line 875 of file signature.c. References _, _free(), checkPassPhrase(), name, RPMERR_SIGGEN, rpmError, rpmExpand(), RPMSIGTAG_GPG, RPMSIGTAG_PGP, and RPMSIGTAG_PGP5. Referenced by main(). |
|
Return type of signature in effect for building.
Definition at line 35 of file signature.c. References _free(), name, 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 234 of file signature.c. References headerNew(). Referenced by headerRegenSigHeader(), and writeRPM(). |
|
Read (and verify header+archive size) signature header. If an old-style signature is found, we emulate a new style one.
Definition at line 144 of file signature.c. References _, checkSize(), HEADER_MAGIC_YES, headerAddEntry(), headerFree(), headerGetEntry(), headerIsEntry(), headerNew(), headerRead(), headerSizeof(), RPM_BIN_TYPE, RPMERR_BADSIGTYPE, rpmError, RPMMESS_DEBUG, rpmMessage, RPMRC_FAIL, RPMRC_OK, RPMRC_SHORTREAD, RPMSIGTAG_PGP, RPMSIGTAG_SIZE, RPMSIGTYPE_DISABLE, RPMSIGTYPE_HEADERSIG, RPMSIGTYPE_MD5, RPMSIGTYPE_MD5_PGP, RPMSIGTYPE_NONE, RPMSIGTYPE_PGP262_1024, RPMTAG_HEADERIMAGE, timedRead, and rpmlead::type. Referenced by main(), readPackageHeaders(), rpmCheckSig(), and rpmReSign(). |
|
Verify a signature from a package.
Definition at line 922 of file signature.c. References _, mdbinfile(), RPMSIG_UNKNOWN, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_SIZE, verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), and verifySizeSignature(). Referenced by rpmCheckSig(). |
|
Write signature header.
Definition at line 214 of file signature.c. References _, Fwrite(), HEADER_MAGIC_YES, headerSizeof(), headerWrite(), RPMMESS_DEBUG, and rpmMessage. Referenced by main(), psmStage(), rpmReSign(), and writeRPM(). |