rpm
5.4.10
|
Routines to handle RFC-2440 detached signatures. More...
#include "system.h"
#include <rpmiotypes.h>
#include <rpmio.h>
#include <rpmbc.h>
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _RPMIOB_INTERNAL |
#define | _RPMPGP_INTERNAL |
#define | TOKEQ(_s, _tok) (!strncmp((_s), (_tok), sizeof(_tok)-1)) |
Functions | |
static void | pgpPrtNL (void) |
static void | pgpPrtInt (const char *pre, int i) |
static void | pgpPrtStr (const char *pre, const char *s) |
static void | pgpPrtHex (const char *pre, const rpmuint8_t *p, size_t plen) |
void | pgpPrtVal (const char *pre, pgpValTbl vs, rpmuint8_t val) |
Print an OpenPGP value. More... | |
int | pgpPrtSubType (const rpmuint8_t *h, size_t hlen, pgpSigType sigtype) |
int | pgpPrtSigParams (pgpDig dig, const pgpPkt pp, pgpPubkeyAlgo pubkey_algo, pgpSigType sigtype, const rpmuint8_t *p) |
int | pgpPrtSig (const pgpPkt pp) |
const rpmuint8_t * | pgpPrtPubkeyParams (pgpDig dig, const pgpPkt pp, pgpPubkeyAlgo pubkey_algo, const rpmuint8_t *p) |
static const rpmuint8_t * | pgpPrtSeckeyParams (const pgpPkt pp, rpmuint8_t pubkey_algo, const rpmuint8_t *p) |
int | pgpPrtKey (const pgpPkt pp) |
int | pgpPrtUserID (const pgpPkt pp) |
int | pgpPrtComment (const pgpPkt pp) |
int | pgpPktLen (const rpmuint8_t *pkt, size_t pleft, pgpPkt pp) |
int | pgpPubkeyFingerprint (const rpmuint8_t *pkt, size_t pktlen, rpmuint8_t *keyid) |
Print/parse an OpenPGP subtype packet. More... | |
int | pgpExtractPubkeyFingerprint (const char *b64pkt, rpmuint8_t *keyid) |
Extract OpenPGP public key fingerprint from base64 encoded packet. More... | |
int | pgpPrtPkt (const rpmuint8_t *pkt, size_t pleft) |
Return lenth of a OpenPGP packet. More... | |
void | pgpDigClean (pgpDig dig) |
Release (malloc'd) data from container. More... | |
static void | pgpDigFini (void *__dig) |
static pgpDig | digGetPool (rpmioPool pool) |
pgpDig | pgpDigNew (pgpVSFlags vsflags, pgpPubkeyAlgo pubkey_algo) |
Create a container for parsed OpenPGP packates. More... | |
pgpDigParams | pgpGetSignature (pgpDig dig) |
Return OpenPGP signature parameters. More... | |
pgpDigParams | pgpGetPubkey (pgpDig dig) |
Return OpenPGP pubkey parameters. More... | |
rpmuint32_t | pgpGetSigtag (pgpDig dig) |
Get signature tag. More... | |
rpmuint32_t | pgpGetSigtype (pgpDig dig) |
Get signature tag type. More... | |
const void * | pgpGetSig (pgpDig dig) |
Get signature tag data, i.e. More... | |
rpmuint32_t | pgpGetSiglen (pgpDig dig) |
Get signature tag data length, i.e. More... | |
int | pgpSetSig (pgpDig dig, rpmuint32_t sigtag, rpmuint32_t sigtype, const void *sig, rpmuint32_t siglen) |
Set signature tag info, i.e. More... | |
void * | pgpStatsAccumulator (pgpDig dig, int opx) |
Return pgpDig container accumulator structure. More... | |
int | pgpSetFindPubkey (pgpDig dig, int(*findPubkey)(void *ts, void *dig), void *_ts) |
Set find pubkey vector. More... | |
int | pgpFindPubkey (pgpDig dig) |
Call find pubkey vector. More... | |
int | pgpGrabPkts (const rpmuint8_t *pkts, size_t pktlen, rpmuint8_t ***pppkts, int *pnpkts) |
Return array of packet pointers. More... | |
int | pgpPrtPkts (const rpmuint8_t *pkts, size_t pktlen, pgpDig dig, int printing) |
Print/parse a OpenPGP packet(s). More... | |
pgpArmor | pgpArmorUnwrap (rpmiob iob, rpmuint8_t **pkt, size_t *pktlen) |
Parse armored OpenPGP packets from an iob. More... | |
pgpArmor | pgpReadPkts (const char *fn, rpmuint8_t **pkt, size_t *pktlen) |
Parse armored OpenPGP packets from a file. More... | |
char * | pgpArmorWrap (rpmuint8_t atype, const unsigned char *s, size_t ns) |
Wrap a OpenPGP packets in ascii armor for transport. More... | |
pgpHashAlgo | pgpHashAlgoStringToNumber (const char *name, size_t name_len) |
Convert a hash algorithm "foo" to the internal PGPHASHALGO_FOO number. More... | |
Variables | |
int | _pgp_debug |
int | _pgp_print |
int | _pgp_error_count |
pgpImplVecs_t * | pgpImplVecs |
static pgpDigParams | _digp = NULL |
struct pgpValTbl_s | pgpSigTypeTbl [] |
struct pgpValTbl_s | pgpPubkeyTbl [] |
struct pgpValTbl_s | pgpSymkeyTbl [] |
Symmetric key (string, value) pairs. More... | |
struct pgpValTbl_s | pgpCompressionTbl [] |
Compression (string, value) pairs. More... | |
struct pgpValTbl_s | pgpHashTbl [] |
Hash (string, value) pairs. More... | |
struct pgpValTbl_s | pgpKeyServerPrefsTbl [] |
struct pgpValTbl_s | pgpSubTypeTbl [] |
Subtype (string, value) pairs. More... | |
struct pgpValTbl_s | pgpTagTbl [] |
struct pgpValTbl_s | pgpArmorTbl [] |
Armor (string, value) pairs. More... | |
struct pgpValTbl_s | pgpArmorKeyTbl [] |
Armor key (string, value) pairs. More... | |
static const char * | pgpSigRSA [] |
static const char * | pgpSigDSA [] |
static const char * | pgpSigECDSA [] |
static const char * | pgpPublicRSA [] |
static const char * | pgpPublicDSA [] |
static const char * | pgpPublicECDSA [] |
static const char * | pgpPublicELGAMAL [] |
pgpVSFlags | pgpDigVSFlags |
Disabler bits(s) for signature/digest checking. More... | |
rpmioPool | _digPool |
Routines to handle RFC-2440 detached signatures.
Definition in file rpmpgp.c.
#define TOKEQ | ( | _s, | |
_tok | |||
) | (!strncmp((_s), (_tok), sizeof(_tok)-1)) |
Referenced by pgpArmorUnwrap().
Definition at line 1189 of file rpmpgp.c.
References _digPool, pgpDigFini(), rpmioGetPool(), and rpmioNewPool().
Referenced by pgpDigNew().
pgpArmor pgpArmorUnwrap | ( | rpmiob | iob, |
rpmuint8_t ** | pkt, | ||
size_t * | pktlen | ||
) |
Parse armored OpenPGP packets from an iob.
iob | I/O buffer |
pkt | dearmored OpenPGP packet(s) |
pktlen | dearmored OpenPGP packet(s) length in bytes |
Definition at line 1397 of file rpmpgp.c.
References _free(), alloca(), crc(), PGPARMOR_ERR_BODY_DECODE, PGPARMOR_ERR_CRC_CHECK, PGPARMOR_ERR_CRC_DECODE, PGPARMOR_ERR_NO_BEGIN_PGP, PGPARMOR_ERR_NO_END_PGP, PGPARMOR_ERR_UNKNOWN_ARMOR_TYPE, PGPARMOR_FILE, PGPARMOR_MESSAGE, PGPARMOR_NONE, PGPARMOR_PRIVKEY, PGPARMOR_PUBKEY, PGPARMOR_SECKEY, PGPARMOR_SIGNATURE, PGPARMOR_SIGNED_MESSAGE, pgpCRC(), pgpGrab(), pgpIsPkt(), pgpPktLen(), PGPTAG_PUBLIC_KEY, PGPTAG_SECRET_KEY, PGPTAG_SIGNATURE, pgpValTok(), and TOKEQ.
Referenced by pgpReadPkts(), pgpValTok(), readFile(), and rpmReadPackageFile().
char* pgpArmorWrap | ( | rpmuint8_t | atype, |
const unsigned char * | s, | ||
size_t | ns | ||
) |
Wrap a OpenPGP packets in ascii armor for transport.
atype | type of armor |
s | binary pkt data |
ns | binary pkt data length |
Definition at line 1574 of file rpmpgp.c.
References _free(), pgpValStr(), stpcpy(), pgpValTbl_s::val, VERSION, and xmalloc.
Referenced by armorFormat(), pgpValTok(), processMetadataFile(), and writeRPM().
void pgpDigClean | ( | pgpDig | dig | ) |
Release (malloc'd) data from container.
dig | signature parameters container |
Definition at line 1107 of file rpmpgp.c.
References _free(), and pgpImplClean().
Referenced by pgpDigFini(), and rpmVerifySignatures().
|
static |
Definition at line 1139 of file rpmpgp.c.
References _free(), pgpDigClean(), pgpImplFree(), and rpmDigestFinal().
Referenced by digGetPool().
pgpDig pgpDigNew | ( | pgpVSFlags | vsflags, |
pgpPubkeyAlgo | pubkey_algo | ||
) |
Create a container for parsed OpenPGP packates.
Generate a keypair (if requested).
vsflags | verify signature flags (usually 0) |
pubkey_algo | pubkey algorithm (0 disables) |
Definition at line 1206 of file rpmpgp.c.
References digGetPool(), pgpDigLink(), pgpDigVSFlags, pgpGetPubkey(), pgpImplGenerate(), pgpImplInit(), rpmbcExportPubkey(), rpmbcImplVecs, and RPMVSF_DEFAULT.
Referenced by buildSpec(), getSignid(), makeGPGSignature(), pgpsigFormat(), rpmcliImportPubkey(), rpmReadHeader(), rpmts_HdrCheck(), and rpmtsDig().
int pgpExtractPubkeyFingerprint | ( | const char * | b64pkt, |
rpmuint8_t * | keyid | ||
) |
Extract OpenPGP public key fingerprint from base64 encoded packet.
b64pkt | base64 encoded openpgp packet |
keyid[8] | public key fingerprint |
Definition at line 1029 of file rpmpgp.c.
References _free(), and pgpPubkeyFingerprint().
Referenced by loadDBT(), and pgpValTok().
int pgpFindPubkey | ( | pgpDig | dig | ) |
Call find pubkey vector.
dig | signature parameters container |
Definition at line 1299 of file rpmpgp.c.
Referenced by rpmnsProbeSignature(), verifyDSA(), and verifyRSA().
pgpDigParams pgpGetPubkey | ( | const pgpDig | dig | ) |
Return OpenPGP pubkey parameters.
dig | signature parameters container |
Definition at line 1232 of file rpmpgp.c.
Referenced by pgpDigNew(), rpmbcExportPubkey(), rpmbcExportSignature(), rpmbcGenerate(), rpmbcSetDSA(), rpmbcSetECDSA(), rpmbcSetELG(), rpmbcSetRSA(), rpmbcSign(), rpmbcVerify(), rpmcliImportPubkey(), rpmnsProbeSignature(), rpmtsFindPubkey(), and rpmtsPubkey().
const void* pgpGetSig | ( | const pgpDig | dig | ) |
Get signature tag data, i.e.
from header.
dig | signature parameters container |
Definition at line 1247 of file rpmpgp.c.
Referenced by headerCheck(), pgpStashKeyid(), rpmVerifySignature(), verifyDSA(), verifyMD5(), verifyRSA(), verifySHA1(), and verifySize().
rpmuint32_t pgpGetSiglen | ( | const pgpDig | dig | ) |
Get signature tag data length, i.e.
no. of bytes of data.
dig | signature parameters container |
Definition at line 1252 of file rpmpgp.c.
Referenced by rpmVerifySignature(), verifyDSA(), verifyMD5(), verifyRSA(), and verifySHA1().
pgpDigParams pgpGetSignature | ( | const pgpDig | dig | ) |
Return OpenPGP signature parameters.
dig | signature parameters container |
Definition at line 1227 of file rpmpgp.c.
Referenced by makeGPGSignature(), pgpsigFormat(), pgpStashKeyid(), rpmbcExportSignature(), rpmbcGenerate(), rpmbcSign(), rpmbcVerify(), rpmnsProbeSignature(), rpmtsFindPubkey(), rpmVerifySignatures(), verifyDSA(), verifyRSA(), and writeRPM().
rpmuint32_t pgpGetSigtag | ( | const pgpDig | dig | ) |
Get signature tag.
dig | signature parameters container |
Definition at line 1237 of file rpmpgp.c.
Referenced by rpmReadPackageFile(), rpmVerifySignature(), verifyDSA(), and verifyRSA().
rpmuint32_t pgpGetSigtype | ( | const pgpDig | dig | ) |
int pgpGrabPkts | ( | const rpmuint8_t * | pkts, |
size_t | pktlen, | ||
rpmuint8_t *** | pppkts, | ||
int * | pnpkts | ||
) |
Return array of packet pointers.
pkts | OpenPGP packet(s) |
pktlen | OpenPGP packet(s) length (no. of bytes) |
*pppkts | array of packet pointers |
*pnpkts | no. of packets |
Definition at line 1307 of file rpmpgp.c.
References _free(), alloca(), pgpPktLen(), and xcalloc().
Referenced by pgpPrtPkts(), pgpValTok(), rpmcliImportPubkey(), rpmnsProbeSignature(), and rpmtsFindPubkey().
pgpHashAlgo pgpHashAlgoStringToNumber | ( | const char * | name, |
size_t | name_len | ||
) |
Convert a hash algorithm "foo" to the internal PGPHASHALGO_FOO number.
name | name of hash algorithm |
name_len | length of name or 0 for strlen(name) |
Definition at line 1623 of file rpmpgp.c.
References PGPHASHALGO_ERROR, pgpHashTbl, pgpValTbl_s::str, pgpValTbl_s::val, and xstrncasecmp().
Referenced by pgpValTok(), and unsatisfiedDepend().
int pgpPktLen | ( | const rpmuint8_t * | pkt, |
size_t | pleft, | ||
pgpPkt | pp | ||
) |
Definition at line 940 of file rpmpgp.c.
References pgpGrab(), pgpLen(), and pgpValTbl_s::val.
Referenced by getSignid(), headerCheck(), pgpArmorUnwrap(), pgpGrabPkts(), pgpPrtPkt(), pgpPrtPkts(), pgpPubkeyFingerprint(), pgpValTok(), rpmcliImportPubkey(), rpmnsProbeSignature(), rpmReadPackageFile(), and rpmVerifySignatures().
int pgpPrtComment | ( | const pgpPkt | pp | ) |
Definition at line 911 of file rpmpgp.c.
References pgpPrtHex(), pgpPrtNL(), and pgpPrtVal().
Referenced by pgpPrtPkt(), and pgpValTok().
|
static |
Definition at line 280 of file rpmpgp.c.
References pgpHexStr().
Referenced by pgpPrtComment(), pgpPrtPkt(), pgpPrtPubkeyParams(), pgpPrtSeckeyParams(), pgpPrtSig(), and pgpPrtSubType().
|
static |
Definition at line 260 of file rpmpgp.c.
Referenced by pgpPrtSeckeyParams().
int pgpPrtKey | ( | const pgpPkt | pp | ) |
Definition at line 833 of file rpmpgp.c.
References pgpGrab(), pgpPrtNL(), pgpPrtPubkeyParams(), pgpPrtSeckeyParams(), pgpPrtVal(), PGPTAG_PUBLIC_KEY, PGPTAG_PUBLIC_SUBKEY, pgpPktKeyV3_s::pubkey_algo, pgpPktKeyV4_s::pubkey_algo, pgpPktKeyV3_s::time, pgpPktKeyV4_s::time, pgpPktKeyV3_s::valid, pgpPktKeyV3_s::version, and pgpPktKeyV4_s::version.
Referenced by pgpPrtPkt(), and pgpValTok().
|
static |
Definition at line 252 of file rpmpgp.c.
Referenced by pgpPrtComment(), pgpPrtKey(), pgpPrtPkt(), pgpPrtPubkeyParams(), pgpPrtSeckeyParams(), pgpPrtSig(), pgpPrtSigParams(), pgpPrtSubType(), and pgpPrtUserID().
int pgpPrtPkt | ( | const rpmuint8_t * | pkt, |
size_t | pleft | ||
) |
Return lenth of a OpenPGP packet.
pkt | OpenPGP packet (i.e. PGPTAG_PUBLIC_KEY) |
pleft | OpenPGP packet length (no. of bytes) |
pp | packet tag/ptr/len |
pkt | OpenPGP packet |
pleft | no. bytes remaining |
Definition at line 1041 of file rpmpgp.c.
References alloca(), pgpPktLen(), pgpPrtComment(), pgpPrtHex(), pgpPrtKey(), pgpPrtNL(), pgpPrtSig(), pgpPrtUserID(), pgpPrtVal(), pgpPubkeyFingerprint(), PGPTAG_COMMENT, PGPTAG_COMMENT_OLD, PGPTAG_COMPRESSED_DATA, PGPTAG_CONTROL, PGPTAG_ENCRYPTED_MDC, PGPTAG_LITERAL_DATA, PGPTAG_MARKER, PGPTAG_MDC, PGPTAG_PHOTOID, PGPTAG_PRIVATE_60, PGPTAG_PRIVATE_62, PGPTAG_PUBLIC_KEY, PGPTAG_PUBLIC_SESSION_KEY, PGPTAG_PUBLIC_SUBKEY, PGPTAG_RESERVED, PGPTAG_SECRET_KEY, PGPTAG_SECRET_SUBKEY, PGPTAG_SIGNATURE, PGPTAG_SYMMETRIC_DATA, PGPTAG_SYMMETRIC_SESSION_KEY, PGPTAG_TRUST, and PGPTAG_USER_ID.
Referenced by pgpPrtPkts(), and pgpValTok().
int pgpPrtPkts | ( | const rpmuint8_t * | pkts, |
size_t | pktlen, | ||
pgpDig | dig, | ||
int | printing | ||
) |
Print/parse a OpenPGP packet(s).
pkts | OpenPGP packet(s) |
pktlen | OpenPGP packet(s) length (no. of bytes) |
dig | parsed output of signature/pubkey packet parameters |
printing | should packets be printed? |
Definition at line 1351 of file rpmpgp.c.
References _free(), alloca(), pgpDigFree(), pgpDigLink(), pgpGrabPkts(), pgpPktLen(), pgpPrtPkt(), PGPTAG_SIGNATURE, and pgpValTbl_s::val.
Referenced by makeGPGSignature(), pgpsigFormat(), pgpValTok(), and rpmts_PgpPrtPkts().
const rpmuint8_t* pgpPrtPubkeyParams | ( | pgpDig | dig, |
const pgpPkt | pp, | ||
pgpPubkeyAlgo | pubkey_algo, | ||
const rpmuint8_t * | p | ||
) |
Definition at line 682 of file rpmpgp.c.
References pgpImplMpiItem(), pgpMpiLen(), pgpMpiStr(), pgpPrtHex(), pgpPrtNL(), pgpPrtStr(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_ECDSA, PGPPUBKEYALGO_ELGAMAL_ENCRYPT, and PGPPUBKEYALGO_RSA.
Referenced by pgpPrtKey(), and pgpValTok().
|
static |
Definition at line 757 of file rpmpgp.c.
References pgpMpiLen(), pgpMpiStr(), pgpPrtHex(), pgpPrtInt(), pgpPrtNL(), pgpPrtStr(), pgpPrtVal(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_ECDSA, PGPPUBKEYALGO_ELGAMAL_ENCRYPT, and PGPPUBKEYALGO_RSA.
Referenced by pgpPrtKey().
int pgpPrtSig | ( | const pgpPkt | pp | ) |
Definition at line 506 of file rpmpgp.c.
References pgpPktSigV3_s::hash_algo, pgpPktSigV4_s::hash_algo, pgpPktSigV3_s::hashlen, pgpPktSigV4_s::hashlen, pgpGrab(), pgpHexStr(), pgpPrtHex(), pgpPrtNL(), pgpPrtSigParams(), pgpPrtSubType(), pgpPrtVal(), pgpPktSigV3_s::pubkey_algo, pgpPktSigV4_s::pubkey_algo, pgpPktSigV3_s::signhash16, pgpPktSigV3_s::signid, pgpPktSigV3_s::sigtype, pgpPktSigV4_s::sigtype, pgpPktSigV3_s::time, pgpPktSigV3_s::version, and pgpPktSigV4_s::version.
Referenced by pgpPrtPkt(), and pgpValTok().
int pgpPrtSigParams | ( | pgpDig | dig, |
const pgpPkt | pp, | ||
pgpPubkeyAlgo | pubkey_algo, | ||
pgpSigType | sigtype, | ||
const rpmuint8_t * | p | ||
) |
Definition at line 430 of file rpmpgp.c.
References pgpImplMpiItem(), pgpMpiLen(), pgpMpiStr(), pgpPrtNL(), pgpPrtStr(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_ECDSA, PGPPUBKEYALGO_RSA, PGPSIGTYPE_BINARY, and PGPSIGTYPE_TEXT.
Referenced by pgpPrtSig(), and pgpValTok().
|
static |
Definition at line 270 of file rpmpgp.c.
Referenced by pgpPrtPubkeyParams(), pgpPrtSeckeyParams(), and pgpPrtSigParams().
int pgpPrtSubType | ( | const rpmuint8_t * | h, |
size_t | hlen, | ||
pgpSigType | sigtype | ||
) |
Definition at line 300 of file rpmpgp.c.
References pgpGrab(), pgpLen(), pgpPrtHex(), pgpPrtNL(), pgpPrtVal(), PGPSIGTYPE_BINARY, PGPSIGTYPE_POSITIVE_CERT, PGPSIGTYPE_STANDALONE, PGPSIGTYPE_TEXT, PGPSUBTYPE_ARR, PGPSUBTYPE_CRITICAL, PGPSUBTYPE_EMBEDDED_SIG, PGPSUBTYPE_EXPORTABLE_CERT, PGPSUBTYPE_FEATURES, PGPSUBTYPE_INTERNAL_100, PGPSUBTYPE_INTERNAL_101, PGPSUBTYPE_INTERNAL_102, PGPSUBTYPE_INTERNAL_103, PGPSUBTYPE_INTERNAL_104, PGPSUBTYPE_INTERNAL_105, PGPSUBTYPE_INTERNAL_106, PGPSUBTYPE_INTERNAL_107, PGPSUBTYPE_INTERNAL_108, PGPSUBTYPE_INTERNAL_109, PGPSUBTYPE_INTERNAL_110, PGPSUBTYPE_ISSUER_KEYID, PGPSUBTYPE_KEY_EXPIRE_TIME, PGPSUBTYPE_KEY_FLAGS, PGPSUBTYPE_KEYSERVER_PREFERS, PGPSUBTYPE_NOTATION, PGPSUBTYPE_POLICY_URL, PGPSUBTYPE_PREFER_COMPRESS, PGPSUBTYPE_PREFER_HASH, PGPSUBTYPE_PREFER_KEYSERVER, PGPSUBTYPE_PREFER_SYMKEY, PGPSUBTYPE_PRIMARY_USERID, PGPSUBTYPE_REGEX, PGPSUBTYPE_REVOCABLE, PGPSUBTYPE_REVOKE_KEY, PGPSUBTYPE_REVOKE_REASON, PGPSUBTYPE_SIG_CREATE_TIME, PGPSUBTYPE_SIG_EXPIRE_TIME, PGPSUBTYPE_SIG_TARGET, PGPSUBTYPE_SIGNER_USERID, and PGPSUBTYPE_TRUST_SIG.
Referenced by pgpPrtSig(), and pgpValTok().
int pgpPrtUserID | ( | const pgpPkt | pp | ) |
Definition at line 894 of file rpmpgp.c.
References _free(), pgpPrtNL(), pgpPrtVal(), and xmalloc.
Referenced by pgpPrtPkt(), and pgpValTok().
void pgpPrtVal | ( | const char * | pre, |
pgpValTbl | vs, | ||
rpmuint8_t | val | ||
) |
Print an OpenPGP value.
pre | output prefix |
vs | table of (string,value) pairs |
val | byte value to print |
Definition at line 290 of file rpmpgp.c.
References pgpValStr().
Referenced by pgpPrtComment(), pgpPrtKey(), pgpPrtPkt(), pgpPrtSeckeyParams(), pgpPrtSig(), pgpPrtSubType(), pgpPrtUserID(), and pgpValTok().
int pgpPubkeyFingerprint | ( | const rpmuint8_t * | pkt, |
size_t | pktlen, | ||
rpmuint8_t * | keyid | ||
) |
Print/parse an OpenPGP subtype packet.
h | packet |
hlen | packet length (no. of bytes) |
sigtype | signature type |
pp | packet tag/ptr/len |
pp | packet tag/ptr/len |
pp | packet tag/ptr/len |
pp | packet tag/ptr/len |
pkt | OpenPGP packet (i.e. PGPTAG_PUBLIC_KEY) |
pktlen | OpenPGP packet length (no. of bytes) |
keyid | publick key fingerprint |
Definition at line 970 of file rpmpgp.c.
References _free(), alloca(), PGPHASHALGO_SHA1, pgpMpiLen(), pgpPktLen(), PGPPUBKEYALGO_DSA, PGPPUBKEYALGO_ECDSA, PGPPUBKEYALGO_RSA, PGPTAG_PUBLIC_KEY, PGPTAG_PUBLIC_SUBKEY, pgpPktKeyV3_s::pubkey_algo, pgpPktKeyV4_s::pubkey_algo, RPMDIGEST_NONE, rpmDigestFinal(), rpmDigestInit(), and rpmDigestUpdate().
Referenced by pgpExtractPubkeyFingerprint(), pgpPrtPkt(), pgpValTok(), rpmbcExportPubkey(), rpmcliImportPubkey(), rpmnsProbeSignature(), and rpmtsFindPubkey().
pgpArmor pgpReadPkts | ( | const char * | fn, |
rpmuint8_t ** | pkt, | ||
size_t * | pktlen | ||
) |
Parse armored OpenPGP packets from a file.
fn | file name |
pkt | dearmored OpenPGP packet(s) |
pktlen | dearmored OpenPGP packet(s) length in bytes |
Definition at line 1564 of file rpmpgp.c.
References PGPARMOR_ERR_NO_BEGIN_PGP, pgpArmorUnwrap(), rpmiobFree(), and rpmiobSlurp().
Referenced by pgpValTok(), processMetadataFile(), rpmcliImportPubkeys(), rpmnsProbeSignature(), and rpmtsFindPubkey().
int pgpSetFindPubkey | ( | pgpDig | dig, |
int(*)(void *ts, void *dig) | findPubkey, | ||
void * | _ts | ||
) |
Set find pubkey vector.
dig | signature parameters container |
findPubkey | routine to find a pubkey. |
_ts | argument to (*findPubkey) (ts, ...) |
Definition at line 1285 of file rpmpgp.c.
Referenced by rpmtsDig().
int pgpSetSig | ( | pgpDig | dig, |
rpmuint32_t | sigtag, | ||
rpmuint32_t | sigtype, | ||
const void * | sig, | ||
rpmuint32_t | siglen | ||
) |
Set signature tag info, i.e.
from header.
dig | signature parameters container |
sigtag | signature tag |
sigtype | signature tag type |
sig | signature tag data |
siglen | signature tag data length |
Definition at line 1257 of file rpmpgp.c.
Referenced by headerCheck(), rpmReadPackageFile(), and rpmVerifySignatures().
void* pgpStatsAccumulator | ( | pgpDig | dig, |
int | opx | ||
) |
Return pgpDig container accumulator structure.
dig | signature parameters container |
opx | per-container accumulator index (aka rpmtsOpX) |
Definition at line 1271 of file rpmpgp.c.
Referenced by headerCheck(), rpmReadPackageFile(), rpmtsCleanDig(), verifyDSA(), verifyMD5(), verifyRSA(), and verifySHA1().
|
static |
rpmioPool _digPool |
Definition at line 1187 of file rpmpgp.c.
Referenced by digGetPool(), and rpmioClean().
int _pgp_debug |
Definition at line 29 of file rpmpgp.c.
Referenced by pgpMpiSet(), and rpmbcMpiItem().
int _pgp_print |
Definition at line 32 of file rpmpgp.c.
Referenced by rpmbcMpiItem().
struct pgpValTbl_s pgpArmorKeyTbl[] |
Armor key (string, value) pairs.
struct pgpValTbl_s pgpArmorTbl[] |
Armor (string, value) pairs.
struct pgpValTbl_s pgpCompressionTbl[] |
Compression (string, value) pairs.
pgpVSFlags pgpDigVSFlags |
Disabler bits(s) for signature/digest checking.
Definition at line 1105 of file rpmpgp.c.
Referenced by headerCheck(), pgpDigNew(), pgpValTok(), rpmcliAllArgCallback(), rpmReadPackageFile(), rpmtsSetVSFlags(), and rpmtsVSFlags().
struct pgpValTbl_s pgpHashTbl[] |
Hash (string, value) pairs.
Definition at line 144 of file rpmpgp.c.
Referenced by _pgpHashAlgo2Name(), and pgpHashAlgoStringToNumber().
pgpImplVecs_t* pgpImplVecs |
Definition at line 38 of file rpmpgp.c.
Referenced by rpmioAllArgCallback().
struct pgpValTbl_s pgpKeyServerPrefsTbl[] |
struct pgpValTbl_s pgpPubkeyTbl[] |
Definition at line 103 of file rpmpgp.c.
Referenced by _pgpPubkeyAlgo2Name().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
struct pgpValTbl_s pgpSigTypeTbl[] |
struct pgpValTbl_s pgpSubTypeTbl[] |
struct pgpValTbl_s pgpSymkeyTbl[] |
Symmetric key (string, value) pairs.
struct pgpValTbl_s pgpTagTbl[] |