rpm  5.4.10
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 <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...
 
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_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 * 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

§ _RPMIOB_INTERNAL

#define _RPMIOB_INTERNAL

Definition at line 8 of file rpmpgp.c.

§ _RPMPGP_INTERNAL

#define _RPMPGP_INTERNAL

Definition at line 13 of file rpmpgp.c.

§ TOKEQ

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

Referenced by pgpArmorUnwrap().

Function Documentation

§ digGetPool()

static pgpDig digGetPool ( rpmioPool  pool)
static

Definition at line 1189 of file rpmpgp.c.

References _digPool, pgpDigFini(), rpmioGetPool(), and rpmioNewPool().

Referenced by pgpDigNew().

§ pgpArmorUnwrap()

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 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().

§ pgpArmorWrap()

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 1574 of file rpmpgp.c.

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

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

§ pgpDigClean()

void pgpDigClean ( pgpDig  dig)

Release (malloc'd) data from container.

Parameters
digsignature parameters container

Definition at line 1107 of file rpmpgp.c.

References _free(), and pgpImplClean().

Referenced by pgpDigFini(), and rpmVerifySignatures().

§ pgpDigFini()

static void pgpDigFini ( void *  __dig)
static

Definition at line 1139 of file rpmpgp.c.

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

Referenced by digGetPool().

§ pgpDigNew()

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 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().

§ pgpExtractPubkeyFingerprint()

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 1029 of file rpmpgp.c.

References _free(), and pgpPubkeyFingerprint().

Referenced by loadDBT(), and pgpValTok().

§ pgpFindPubkey()

int pgpFindPubkey ( pgpDig  dig)

Call find pubkey vector.

Parameters
digsignature parameters container
Returns
rpmRC return code

Definition at line 1299 of file rpmpgp.c.

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

§ pgpGetPubkey()

pgpDigParams pgpGetPubkey ( const pgpDig  dig)

Return OpenPGP pubkey parameters.

Parameters
digsignature parameters container
Returns
pubkey parameters

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().

§ pgpGetSig()

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 1247 of file rpmpgp.c.

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

§ pgpGetSiglen()

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 1252 of file rpmpgp.c.

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

§ pgpGetSignature()

pgpDigParams pgpGetSignature ( const pgpDig  dig)

Return OpenPGP signature parameters.

Parameters
digsignature parameters container
Returns
signature parameters

Definition at line 1227 of file rpmpgp.c.

Referenced by makeGPGSignature(), pgpsigFormat(), pgpStashKeyid(), rpmbcExportSignature(), rpmbcGenerate(), rpmbcSign(), rpmbcVerify(), rpmnsProbeSignature(), rpmtsFindPubkey(), rpmVerifySignatures(), verifyDSA(), verifyRSA(), and writeRPM().

§ pgpGetSigtag()

rpmuint32_t pgpGetSigtag ( const pgpDig  dig)

Get signature tag.

Parameters
digsignature parameters container
Returns
signature tag

Definition at line 1237 of file rpmpgp.c.

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

§ pgpGetSigtype()

rpmuint32_t pgpGetSigtype ( const pgpDig  dig)

Get signature tag type.

Parameters
digsignature parameters container
Returns
signature tag type

Definition at line 1242 of file rpmpgp.c.

§ pgpGrabPkts()

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 1307 of file rpmpgp.c.

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

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

§ pgpHashAlgoStringToNumber()

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 1623 of file rpmpgp.c.

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

Referenced by pgpValTok(), and unsatisfiedDepend().

§ pgpPktLen()

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

§ pgpPrtComment()

int pgpPrtComment ( const pgpPkt  pp)

Definition at line 911 of file rpmpgp.c.

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

Referenced by pgpPrtPkt(), and pgpValTok().

§ pgpPrtHex()

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

§ pgpPrtInt()

static void pgpPrtInt ( const char *  pre,
int  i 
)
static

Definition at line 260 of file rpmpgp.c.

Referenced by pgpPrtSeckeyParams().

§ pgpPrtKey()

int pgpPrtKey ( const pgpPkt  pp)

§ pgpPrtNL()

static void pgpPrtNL ( void  )
static

§ pgpPrtPkt()

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 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().

§ 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 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().

§ pgpPrtPubkeyParams()

const rpmuint8_t* pgpPrtPubkeyParams ( pgpDig  dig,
const pgpPkt  pp,
pgpPubkeyAlgo  pubkey_algo,
const rpmuint8_t p 
)

§ pgpPrtSeckeyParams()

static const rpmuint8_t* pgpPrtSeckeyParams ( const pgpPkt  pp,
rpmuint8_t  pubkey_algo,
const rpmuint8_t p 
)
static

§ pgpPrtSig()

int pgpPrtSig ( const pgpPkt  pp)

§ pgpPrtSigParams()

int pgpPrtSigParams ( pgpDig  dig,
const pgpPkt  pp,
pgpPubkeyAlgo  pubkey_algo,
pgpSigType  sigtype,
const rpmuint8_t p 
)

§ pgpPrtStr()

static void pgpPrtStr ( const char *  pre,
const char *  s 
)
static

Definition at line 270 of file rpmpgp.c.

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

§ pgpPrtSubType()

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

§ pgpPrtUserID()

int pgpPrtUserID ( const pgpPkt  pp)

Definition at line 894 of file rpmpgp.c.

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

Referenced by pgpPrtPkt(), and pgpValTok().

§ pgpPrtVal()

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 290 of file rpmpgp.c.

References pgpValStr().

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

§ pgpPubkeyFingerprint()

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 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().

§ pgpReadPkts()

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 1564 of file rpmpgp.c.

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

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

§ pgpSetFindPubkey()

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 1285 of file rpmpgp.c.

Referenced by rpmtsDig().

§ pgpSetSig()

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 1257 of file rpmpgp.c.

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

§ pgpStatsAccumulator()

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 1271 of file rpmpgp.c.

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

Variable Documentation

§ _digp

pgpDigParams _digp = NULL
static

Definition at line 73 of file rpmpgp.c.

§ _digPool

rpmioPool _digPool

Definition at line 1187 of file rpmpgp.c.

Referenced by digGetPool(), and rpmioClean().

§ _pgp_debug

int _pgp_debug

Definition at line 29 of file rpmpgp.c.

Referenced by pgpMpiSet(), and rpmbcMpiItem().

§ _pgp_error_count

int _pgp_error_count

Definition at line 35 of file rpmpgp.c.

§ _pgp_print

int _pgp_print

Definition at line 32 of file rpmpgp.c.

Referenced by rpmbcMpiItem().

§ pgpArmorKeyTbl

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 243 of file rpmpgp.c.

§ pgpArmorTbl

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 232 of file rpmpgp.c.

§ pgpCompressionTbl

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 136 of file rpmpgp.c.

§ pgpDigVSFlags

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().

§ pgpHashTbl

struct pgpValTbl_s pgpHashTbl[]
Initial value:

Hash (string, value) pairs.

Definition at line 144 of file rpmpgp.c.

Referenced by _pgpHashAlgo2Name(), and pgpHashAlgoStringToNumber().

§ pgpImplVecs

pgpImplVecs_t* pgpImplVecs

Definition at line 38 of file rpmpgp.c.

Referenced by rpmioAllArgCallback().

§ pgpKeyServerPrefsTbl

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

Definition at line 160 of file rpmpgp.c.

§ pgpPubkeyTbl

struct pgpValTbl_s pgpPubkeyTbl[]
Initial value:

Definition at line 103 of file rpmpgp.c.

Referenced by _pgpPubkeyAlgo2Name().

§ pgpPublicDSA

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

Definition at line 635 of file rpmpgp.c.

§ pgpPublicECDSA

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

Definition at line 652 of file rpmpgp.c.

§ pgpPublicELGAMAL

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

Definition at line 666 of file rpmpgp.c.

§ pgpPublicRSA

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

Definition at line 617 of file rpmpgp.c.

§ pgpSigDSA

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

Definition at line 416 of file rpmpgp.c.

§ pgpSigECDSA

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

Definition at line 423 of file rpmpgp.c.

§ pgpSigRSA

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

Definition at line 410 of file rpmpgp.c.

§ pgpSigTypeTbl

struct pgpValTbl_s pgpSigTypeTbl[]

§ pgpSubTypeTbl

struct pgpValTbl_s pgpSubTypeTbl[]

Subtype (string, value) pairs.

Definition at line 166 of file rpmpgp.c.

§ pgpSymkeyTbl

struct pgpValTbl_s pgpSymkeyTbl[]
Initial value:

Symmetric key (string, value) pairs.

Definition at line 117 of file rpmpgp.c.

§ pgpTagTbl

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 206 of file rpmpgp.c.