rpm  5.4.15
Macros | Functions | Variables
rpmpgp.c File Reference

Routines to handle RFC-2440 detached signatures. More...

#include "system.h"
#include <rpmiotypes.h>
#include <rpmio.h>
#include <rpmmacro.h>
#include <rpmbc.h>
#include "debug.h"
Include dependency graph for rpmpgp.c:

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_tpgpPrtPubkeyParams (pgpDig dig, const pgpPkt pp, pgpPubkeyAlgo pubkey_algo, const rpmuint8_t *p)
 
static const rpmuint8_tpgpPrtSeckeyParams (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...
 
const char * pgpHashAlgo2Name (uint32_t algo)
 
const char * pgpPubkeyAlgo2Name (uint32_t algo)
 
rpmuint8_t pgpHashName2Algo (const char *name)
 
rpmuint8_t pgpPubkeyName2Algo (const char *name)
 
int pgpDigSetAlgos (pgpDig dig)
 
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...
 
int pgpExportPubkey (pgpDig dig)
 
int pgpExportSignature (pgpDig dig, DIGEST_CTX ctx)
 
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_tpgpImplVecs
 
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 * pgpPublicECDH []
 
static const char * pgpPublicELGAMAL []
 
pgpVSFlags pgpDigVSFlags
 Disabler bits(s) for signature/digest checking. More...
 
rpmioPool _digPool
 

Detailed Description

Routines to handle RFC-2440 detached signatures.

Definition in file rpmpgp.c.

Macro Definition Documentation

#define _RPMIOB_INTERNAL

Definition at line 8 of file rpmpgp.c.

#define _RPMPGP_INTERNAL

Definition at line 14 of file rpmpgp.c.

#define TOKEQ (   _s,
  _tok 
)    (!strncmp((_s), (_tok), sizeof(_tok)-1))

Referenced by pgpArmorUnwrap().

Function Documentation

static pgpDig digGetPool ( rpmioPool  pool)
static

Definition at line 1297 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.

Parameters
iobI/O buffer
Return values
pktdearmored OpenPGP packet(s)
pktlendearmored OpenPGP packet(s) length in bytes
Returns
type of armor found

Definition at line 1564 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(), readFile(), and rpmReadPackageFile().

char* pgpArmorWrap ( rpmuint8_t  atype,
const unsigned char *  s,
size_t  ns 
)

Wrap a OpenPGP packets in ascii armor for transport.

Parameters
atypetype of armor
sbinary pkt data
nsbinary pkt data length
Returns
formatted string

Definition at line 1749 of file rpmpgp.c.

References _free(), pgpImplVecs_s::_pgpNV, pgpValStr(), stpcpy(), pgpValTbl_s::val, VERSION, and xmalloc.

Referenced by armorFormat(), processMetadataFile(), and writeRPM().

void pgpDigClean ( pgpDig  dig)

Release (malloc'd) data from container.

Parameters
digsignature parameters container

Definition at line 1155 of file rpmpgp.c.

References _free(), and pgpImplClean().

Referenced by pgpDigFini(), and rpmVerifySignatures().

static void pgpDigFini ( void *  __dig)
static

Definition at line 1243 of file rpmpgp.c.

References _free(), pgpDigClean(), pgpImplFree(), rpmDigestFinal(), yarnPossess(), and yarnRelease().

Referenced by digGetPool().

pgpDig pgpDigNew ( pgpVSFlags  vsflags,
pgpPubkeyAlgo  pubkey_algo 
)

Create a container for parsed OpenPGP packates.

Generate a keypair (if requested).

Parameters
vsflagsverify signature flags (usually 0)
pubkey_algopubkey algorithm (0 disables)
Returns
container

Definition at line 1314 of file rpmpgp.c.

References digGetPool(), pgpDigLink(), pgpDigSetAlgos(), pgpDigVSFlags, pgpExportPubkey(), pgpGetPubkey(), pgpGetSignature(), pgpImplGenerate(), pgpImplInit(), and RPMVSF_DEFAULT.

Referenced by buildSpec(), getSignid(), makeGPGSignature(), pgpsigFormat(), rpmcliImportPubkey(), rpmhkpVerify(), rpmReadHeader(), rpmts_HdrCheck(), and rpmtsDig().

int pgpDigSetAlgos ( pgpDig  dig)
int pgpExportPubkey ( pgpDig  dig)
int pgpExportSignature ( pgpDig  dig,
DIGEST_CTX  ctx 
)
int pgpExtractPubkeyFingerprint ( const char *  b64pkt,
rpmuint8_t keyid 
)

Extract OpenPGP public key fingerprint from base64 encoded packet.

Todo:
V3 non-RSA public keys not implemented.
Parameters
b64pktbase64 encoded openpgp packet
Return values
keyid[8]public key fingerprint
Returns
8 (no. of bytes) on success, < 0 on error

Definition at line 1077 of file rpmpgp.c.

References _free(), and pgpPubkeyFingerprint().

Referenced by loadDBT().

int pgpFindPubkey ( pgpDig  dig)

Call find pubkey vector.

Parameters
digsignature parameters container
Returns
rpmRC return code

Definition at line 1464 of file rpmpgp.c.

Referenced by rpmnsProbeSignature(), verifyDSA(), verifyECDSA(), and verifyRSA().

pgpDigParams pgpGetPubkey ( const pgpDig  dig)
const void* pgpGetSig ( const pgpDig  dig)

Get signature tag data, i.e.

from header.

Parameters
digsignature parameters container
Returns
signature tag data

Definition at line 1412 of file rpmpgp.c.

Referenced by headerCheck(), pgpStashKeyid(), rpmVerifySignature(), verifyDSA(), verifyECDSA(), verifyMD5(), verifyRSA(), verifySHA1(), and verifySize().

rpmuint32_t pgpGetSiglen ( const pgpDig  dig)

Get signature tag data length, i.e.

no. of bytes of data.

Parameters
digsignature parameters container
Returns
signature tag data length

Definition at line 1417 of file rpmpgp.c.

Referenced by rpmVerifySignature(), verifyDSA(), verifyECDSA(), verifyMD5(), verifyRSA(), and verifySHA1().

pgpDigParams pgpGetSignature ( const pgpDig  dig)
rpmuint32_t pgpGetSigtag ( const pgpDig  dig)

Get signature tag.

Parameters
digsignature parameters container
Returns
signature tag

Definition at line 1402 of file rpmpgp.c.

Referenced by rpmReadPackageFile(), rpmVerifySignature(), verifyDSA(), verifyECDSA(), and verifyRSA().

rpmuint32_t pgpGetSigtype ( const pgpDig  dig)

Get signature tag type.

Parameters
digsignature parameters container
Returns
signature tag type

Definition at line 1407 of file rpmpgp.c.

int pgpGrabPkts ( const rpmuint8_t pkts,
size_t  pktlen,
rpmuint8_t ***  pppkts,
int *  pnpkts 
)

Return array of packet pointers.

Parameters
pktsOpenPGP packet(s)
pktlenOpenPGP packet(s) length (no. of bytes)
Return values
*pppktsarray of packet pointers
*pnpktsno. of packets
Returns
0 on success, <0 on error

Definition at line 1472 of file rpmpgp.c.

References _free(), alloca(), len, pgpPktLen(), and xcalloc().

Referenced by pgpPrtPkts(), rpmcliImportPubkey(), rpmhkpLookup(), rpmnsProbeSignature(), and rpmtsFindPubkey().

const char* pgpHashAlgo2Name ( uint32_t  algo)

Definition at line 1188 of file rpmpgp.c.

References pgpValStr().

Referenced by rpmbcSetDSA(), rpmbcSetECDSA(), rpmbcSetELG(), and rpmbcSetRSA().

pgpHashAlgo pgpHashAlgoStringToNumber ( const char *  name,
size_t  name_len 
)

Convert a hash algorithm "foo" to the internal PGPHASHALGO_FOO number.

Parameters
namename of hash algorithm
name_lenlength of name or 0 for strlen(name)
Returns
PGPHASHALGO_<name> or -1 in case of error

Definition at line 1805 of file rpmpgp.c.

References i, PGPHASHALGO_ERROR, pgpHashTbl, str, pgpValTbl_s::val, and xstrncasecmp().

Referenced by unsatisfiedDepend().

rpmuint8_t pgpHashName2Algo ( const char *  name)

Definition at line 1198 of file rpmpgp.c.

References pgpStrVal().

Referenced by pgpDigSetAlgos().

int pgpPktLen ( const rpmuint8_t pkt,
size_t  pleft,
pgpPkt  pp 
)
int pgpPrtComment ( const pgpPkt  pp)

Definition at line 970 of file rpmpgp.c.

References i, j, pgpPrtHex(), pgpPrtNL(), and pgpPrtVal().

Referenced by pgpPrtPkt().

static void pgpPrtHex ( const char *  pre,
const rpmuint8_t p,
size_t  plen 
)
static
static void pgpPrtInt ( const char *  pre,
int  i 
)
static

Definition at line 272 of file rpmpgp.c.

Referenced by pgpPrtSeckeyParams().

int pgpPrtKey ( const pgpPkt  pp)
static void pgpPrtNL ( void  )
static
int pgpPrtPkt ( const rpmuint8_t pkt,
size_t  pleft 
)

Return lenth of a OpenPGP packet.

Parameters
pktOpenPGP packet (i.e. PGPTAG_PUBLIC_KEY)
pleftOpenPGP packet length (no. of bytes)
Return values
pppacket tag/ptr/len
Returns
packet length, <0 on error. Print/parse next OpenPGP packet.
Parameters
pktOpenPGP packet
pleftno. bytes remaining
Returns
-1 on error, otherwise this packet length

Definition at line 1089 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().

int pgpPrtPkts ( const rpmuint8_t pkts,
size_t  pktlen,
pgpDig  dig,
int  printing 
)

Print/parse a OpenPGP packet(s).

Parameters
pktsOpenPGP packet(s)
pktlenOpenPGP packet(s) length (no. of bytes)
Return values
digparsed output of signature/pubkey packet parameters
Parameters
printingshould packets be printed?
Returns
-1 on error, 0 on success

Definition at line 1518 of file rpmpgp.c.

References _free(), alloca(), i, len, pgpDigFree(), pgpDigLink(), pgpGrabPkts(), pgpPktLen(), pgpPrtPkt(), PGPTAG_SIGNATURE, and pgpValTbl_s::val.

Referenced by makeGPGSignature(), pgpsigFormat(), rpmnsProbeSignature(), and rpmts_PgpPrtPkts().

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 
)
static
int pgpPrtSig ( const pgpPkt  pp)
int pgpPrtSigParams ( pgpDig  dig,
const pgpPkt  pp,
pgpPubkeyAlgo  pubkey_algo,
pgpSigType  sigtype,
const rpmuint8_t p 
)
static void pgpPrtStr ( const char *  pre,
const char *  s 
)
static

Definition at line 282 of file rpmpgp.c.

Referenced by pgpPrtPubkeyParams(), pgpPrtSeckeyParams(), and pgpPrtSigParams().

int pgpPrtSubType ( const rpmuint8_t h,
size_t  hlen,
pgpSigType  sigtype 
)
int pgpPrtUserID ( const pgpPkt  pp)

Definition at line 953 of file rpmpgp.c.

References _free(), pgpPrtNL(), pgpPrtVal(), and xmalloc.

Referenced by pgpPrtPkt().

void pgpPrtVal ( const char *  pre,
pgpValTbl  vs,
rpmuint8_t  val 
)

Print an OpenPGP value.

Parameters
preoutput prefix
vstable of (string,value) pairs
valbyte value to print

Definition at line 302 of file rpmpgp.c.

References pgpValStr().

Referenced by pgpPrtComment(), pgpPrtKey(), pgpPrtPkt(), pgpPrtSeckeyParams(), pgpPrtSig(), pgpPrtSubType(), and pgpPrtUserID().

const char* pgpPubkeyAlgo2Name ( uint32_t  algo)

Definition at line 1193 of file rpmpgp.c.

References pgpValStr().

Referenced by rpmbcSetDSA(), rpmbcSetECDSA(), rpmbcSetELG(), and rpmbcSetRSA().

int pgpPubkeyFingerprint ( const rpmuint8_t pkt,
size_t  pktlen,
rpmuint8_t keyid 
)

Print/parse an OpenPGP subtype packet.

Parameters
hpacket
hlenpacket length (no. of bytes)
sigtypesignature type
Returns
0 on success Print/parse an OpenPGP signature packet.
Parameters
pppacket tag/ptr/len
Returns
0 on success Print/parse an OpenPGP key packet.
Parameters
pppacket tag/ptr/len
Returns
0 on success Print/parse an OpenPGP userid packet.
Parameters
pppacket tag/ptr/len
Returns
0 on success Print/parse an OpenPGP comment packet.
Parameters
pppacket tag/ptr/len
Returns
0 on success Calculate OpenPGP public key fingerprint.
Todo:
V3 non-RSA public keys not implemented.
Parameters
pktOpenPGP packet (i.e. PGPTAG_PUBLIC_KEY)
pktlenOpenPGP packet length (no. of bytes)
Return values
keyidpublick key fingerprint
Returns
0 on success, else -1

Definition at line 1029 of file rpmpgp.c.

References _free(), alloca(), d, PGPHASHALGO_SHA1, pgpMpiLen(), pgpPktLen(), PGPPUBKEYALGO_RSA, PGPTAG_PUBLIC_KEY, PGPTAG_PUBLIC_SUBKEY, pgpPktKeyV3_s::pubkey_algo, RPMDIGEST_NONE, rpmDigestFinal(), rpmDigestInit(), rpmDigestUpdate(), and v.

Referenced by pgpExtractPubkeyFingerprint(), pgpPrtPkt(), rpmbcExportPubkey(), rpmcliImportPubkey(), rpmhkpLookup(), rpmhkpValidate(), rpmnsProbeSignature(), and rpmtsFindPubkey().

rpmuint8_t pgpPubkeyName2Algo ( const char *  name)

Definition at line 1203 of file rpmpgp.c.

References pgpStrVal().

Referenced by pgpDigSetAlgos().

pgpArmor pgpReadPkts ( const char *  fn,
rpmuint8_t **  pkt,
size_t *  pktlen 
)

Parse armored OpenPGP packets from a file.

Parameters
fnfile name
Return values
pktdearmored OpenPGP packet(s)
pktlendearmored OpenPGP packet(s) length in bytes
Returns
type of armor found

Definition at line 1739 of file rpmpgp.c.

References PGPARMOR_ERR_NO_BEGIN_PGP, pgpArmorUnwrap(), rpmiobFree(), and rpmiobSlurp().

Referenced by processMetadataFile(), rpmcliImportPubkeys(), rpmhkpLookup(), rpmnsProbeSignature(), and rpmtsFindPubkey().

int pgpSetFindPubkey ( pgpDig  dig,
int(*)(void *ts, void *dig)  findPubkey,
void *  _ts 
)

Set find pubkey vector.

Parameters
digsignature parameters container
findPubkeyroutine to find a pubkey.
_tsargument to (*findPubkey) (ts, ...)
Returns
0 always

Definition at line 1450 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.

Parameters
digsignature parameters container
sigtagsignature tag
sigtypesignature tag type
sigsignature tag data
siglensignature tag data length
Returns
0 always

Definition at line 1422 of file rpmpgp.c.

Referenced by headerCheck(), rpmReadPackageFile(), and rpmVerifySignatures().

void* pgpStatsAccumulator ( pgpDig  dig,
int  opx 
)

Return pgpDig container accumulator structure.

Parameters
digsignature parameters container
opxper-container accumulator index (aka rpmtsOpX)
Returns
per-container accumulator pointer

Definition at line 1436 of file rpmpgp.c.

Referenced by hBlobDigest(), rpmReadPackageFile(), rpmtsCleanDig(), verifyDSA(), verifyECDSA(), verifyMD5(), verifyRSA(), and verifySHA1().

Variable Documentation

pgpDigParams _digp = NULL
static

Definition at line 86 of file rpmpgp.c.

rpmioPool _digPool

Definition at line 1295 of file rpmpgp.c.

Referenced by digGetPool(), and rpmioClean().

int _pgp_debug

Definition at line 42 of file rpmpgp.c.

Referenced by rpmbcMpiItem().

int _pgp_error_count

Definition at line 48 of file rpmpgp.c.

int _pgp_print

Definition at line 45 of file rpmpgp.c.

Referenced by rpmbcMpiItem().

struct pgpValTbl_s pgpArmorKeyTbl[]
Initial value:
= {
{ PGPARMORKEY_VERSION, "Version: " },
{ PGPARMORKEY_COMMENT, "Comment: " },
{ PGPARMORKEY_MESSAGEID, "MessageID: " },
{ PGPARMORKEY_HASH, "Hash: " },
{ PGPARMORKEY_CHARSET, "Charset: " },
{ -1, "Unknown armor key" }
}

Armor key (string, value) pairs.

Definition at line 255 of file rpmpgp.c.

struct pgpValTbl_s pgpArmorTbl[]
Initial value:
= {
{ PGPARMOR_MESSAGE, "MESSAGE" },
{ PGPARMOR_PUBKEY, "PUBLIC KEY BLOCK" },
{ PGPARMOR_SIGNATURE, "SIGNATURE" },
{ PGPARMOR_SIGNED_MESSAGE, "SIGNED MESSAGE" },
{ PGPARMOR_FILE, "ARMORED FILE" },
{ PGPARMOR_PRIVKEY, "PRIVATE KEY BLOCK" },
{ PGPARMOR_SECKEY, "SECRET KEY BLOCK" },
{ -1, "Unknown armor block" }
}

Armor (string, value) pairs.

Definition at line 244 of file rpmpgp.c.

struct pgpValTbl_s pgpCompressionTbl[]
Initial value:
= {
{ PGPCOMPRESSALGO_NONE, "Uncompressed" },
{ PGPCOMPRESSALGO_ZIP, "ZIP" },
{ PGPCOMPRESSALGO_ZLIB, "ZLIB" },
{ PGPCOMPRESSALGO_BZIP2, "BZIP2" },
{ -1, "Unknown compression algorithm" },
}

Compression (string, value) pairs.

Definition at line 148 of file rpmpgp.c.

pgpVSFlags pgpDigVSFlags

Disabler bits(s) for signature/digest checking.

Definition at line 1153 of file rpmpgp.c.

Referenced by headerCheck(), pgpDigNew(), rpmcliAllArgCallback(), rpmReadPackageFile(), rpmtsSetVSFlags(), and rpmtsVSFlags().

struct pgpValTbl_s pgpHashTbl[]
Initial value:

Hash (string, value) pairs.

Definition at line 156 of file rpmpgp.c.

Referenced by _pgpHashAlgo2Name(), and pgpHashAlgoStringToNumber().

pgpImplVecs_t* pgpImplVecs

Definition at line 51 of file rpmpgp.c.

Referenced by rpmioAllArgCallback().

struct pgpValTbl_s pgpKeyServerPrefsTbl[]
Initial value:
= {
{ 0x80, "No-modify" },
{ -1, "Unknown key server preference" },
}

Definition at line 172 of file rpmpgp.c.

struct pgpValTbl_s pgpPubkeyTbl[]
Initial value:

Definition at line 116 of file rpmpgp.c.

Referenced by _pgpPubkeyAlgo2Name().

const char* pgpPublicDSA[]
static
Initial value:
= {
" p =",
" q =",
" g =",
" y =",
NULL,
}

Definition at line 654 of file rpmpgp.c.

const char* pgpPublicECDH[]
static
Initial value:
= {
" Q =",
NULL,
}

Definition at line 685 of file rpmpgp.c.

const char* pgpPublicECDSA[]
static
Initial value:
= {
" Q =",
NULL,
}

Definition at line 671 of file rpmpgp.c.

const char* pgpPublicELGAMAL[]
static
Initial value:
= {
" p =",
" g =",
" y =",
NULL,
}

Definition at line 699 of file rpmpgp.c.

const char* pgpPublicRSA[]
static
Initial value:
= {
" n =",
" e =",
NULL,
}

Definition at line 636 of file rpmpgp.c.

const char* pgpSigDSA[]
static
Initial value:
= {
" r =",
" s =",
NULL,
}

Definition at line 435 of file rpmpgp.c.

const char* pgpSigECDSA[]
static
Initial value:
= {
" r =",
" s =",
NULL,
}

Definition at line 442 of file rpmpgp.c.

const char* pgpSigRSA[]
static
Initial value:
= {
" m**d =",
NULL,
}

Definition at line 429 of file rpmpgp.c.

struct pgpValTbl_s pgpSigTypeTbl[]
struct pgpValTbl_s pgpSubTypeTbl[]

Subtype (string, value) pairs.

Definition at line 178 of file rpmpgp.c.

struct pgpValTbl_s pgpSymkeyTbl[]
Initial value:

Symmetric key (string, value) pairs.

Definition at line 129 of file rpmpgp.c.

struct pgpValTbl_s pgpTagTbl[]
Initial value:
= {
{ PGPTAG_PUBLIC_SESSION_KEY,"Public-Key Encrypted Session Key" },
{ PGPTAG_SIGNATURE, "Signature" },
{ PGPTAG_SYMMETRIC_SESSION_KEY,"Symmetric-Key Encrypted Session Key" },
{ PGPTAG_ONEPASS_SIGNATURE, "One-Pass Signature" },
{ PGPTAG_SECRET_KEY, "Secret Key" },
{ PGPTAG_PUBLIC_KEY, "Public Key" },
{ PGPTAG_SECRET_SUBKEY, "Secret Subkey" },
{ PGPTAG_COMPRESSED_DATA, "Compressed Data" },
{ PGPTAG_SYMMETRIC_DATA, "Symmetrically Encrypted Data" },
{ PGPTAG_MARKER, "Marker" },
{ PGPTAG_LITERAL_DATA, "Literal Data" },
{ PGPTAG_TRUST, "Trust" },
{ PGPTAG_USER_ID, "User ID" },
{ PGPTAG_PUBLIC_SUBKEY, "Public Subkey" },
{ PGPTAG_COMMENT_OLD, "Comment (from OpenPGP draft)" },
{ PGPTAG_PHOTOID, "PGP's photo ID" },
{ PGPTAG_ENCRYPTED_MDC, "Integrity protected encrypted data" },
{ PGPTAG_MDC, "Manipulaion detection code packet" },
{ PGPTAG_PRIVATE_60, "Private #60" },
{ PGPTAG_COMMENT, "Comment" },
{ PGPTAG_PRIVATE_62, "Private #62" },
{ PGPTAG_CONTROL, "Control (GPG)" },
{ -1, "TAG_UNKNOWN" },
}

Definition at line 218 of file rpmpgp.c.

Referenced by _pgpTag2Name().