rpm
5.4.14
|
OpenPGP constants and structures from RFC-2440. More...
Go to the source code of this file.
Data Structures | |
struct | pgpValTbl_s |
struct | pgpPktPubkey_s |
5.1. More... | |
struct | pgpPktSigV3_s |
5.2.2. More... | |
struct | pgpPktSigV4_s |
5.2.3. More... | |
union | pgpPktSig_u |
5.2. More... | |
struct | pgpPktSymkey_s |
5.3. More... | |
struct | pgpPktOnepass_s |
5.4. More... | |
struct | pgpPktKeyV3_s |
5.5.1. More... | |
struct | pgpPktKeyV4_s |
The version 4 format is similar to the version 3 format except for the absence of a validity period. More... | |
union | pgpPktKey_u |
5.5.3. More... | |
struct | pgpPktCdata_s |
5.6. More... | |
struct | pgpPktEdata_s |
5.7. More... | |
struct | pgpPktLdata_s |
5.8. More... | |
struct | pgpPktTrust_s |
5.10. More... | |
struct | pgpPktUid_s |
5.11. More... | |
struct | pgpImplVecs_s |
Macros | |
#define | PGPARMOR_ERROR PGPARMOR_ERR_NO_BEGIN_PGP |
#define | pgpDigUnlink(_dig) ((pgpDig)rpmioUnlinkPoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__)) |
#define | pgpDigLink(_dig) ((pgpDig)rpmioLinkPoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__)) |
#define | pgpDigFree(_dig) ((pgpDig)rpmioFreePoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__)) |
#define | CRC24_INIT 0xb704ce |
#define | CRC24_POLY 0x1864cfb |
Functions | |
static unsigned int | pgpGrab (const rpmuint8_t *s, size_t nbytes) |
Return (native-endian) integer from big-endian representation. More... | |
static unsigned int | pgpLen (const rpmuint8_t *s, unsigned int *lenp) |
Return length of an OpenPGP packet. More... | |
static unsigned int | pgpMpiBits (const rpmuint8_t *p) |
Return no. More... | |
static unsigned int | pgpMpiLen (const rpmuint8_t *p) |
Return no. More... | |
static char * | pgpHexCvt (char *t, const rpmuint8_t *s, size_t nbytes) |
Convert to hex. More... | |
static char * | pgpHexStr (const rpmuint8_t *p, size_t plen) |
Return hex formatted representation of bytes. More... | |
static const char * | pgpMpiStr (const rpmuint8_t *p) |
Return hex formatted representation of a multiprecision integer. More... | |
static const char * | pgpValStr (pgpValTbl vs, rpmuint8_t val) |
Return string representation of am OpenPGP value. More... | |
static int | pgpValTok (pgpValTbl vs, const char *s, const char *se) |
Return value of an OpenPGP string. More... | |
void | pgpPrtVal (const char *pre, pgpValTbl vs, rpmuint8_t val) |
Print an OpenPGP value. More... | |
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... | |
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... | |
pgpDig | pgpDigUnlink (pgpDig dig) |
Unreference a signature parameters instance. More... | |
pgpDig | pgpDigLink (pgpDig dig) |
Reference a signature parameters instance. More... | |
pgpDig | pgpDigFree (pgpDig dig) |
Destroy a container for parsed OpenPGP packates. More... | |
pgpDig | pgpDigNew (pgpVSFlags vsflags, pgpPubkeyAlgo pubkey_algo) |
Create a container for parsed OpenPGP packates. More... | |
int | rpmbcExportPubkey (pgpDig dig) |
int | rpmbcExportSignature (pgpDig dig, DIGEST_CTX ctx) |
void | pgpDigClean (pgpDig dig) |
Release (malloc'd) data from container. More... | |
pgpDigParams | pgpGetPubkey (const pgpDig dig) |
Return OpenPGP pubkey parameters. More... | |
pgpDigParams | pgpGetSignature (const pgpDig dig) |
Return OpenPGP signature parameters. More... | |
rpmuint32_t | pgpGetSigtag (const pgpDig dig) |
Get signature tag. More... | |
rpmuint32_t | pgpGetSigtype (const pgpDig dig) |
Get signature tag type. More... | |
const void * | pgpGetSig (const pgpDig dig) |
Get signature tag data, i.e. More... | |
rpmuint32_t | pgpGetSiglen (const 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... | |
static int | pgpIsPkt (const rpmuint8_t *p, pgpTag *tagp) |
Is buffer at beginning of an OpenPGP packet? More... | |
static unsigned int | pgpCRC (const rpmuint8_t *octets, size_t len) |
Return CRC of a buffer. More... | |
static int | pgpImplSetRSA (DIGEST_CTX ctx, pgpDig dig, pgpDigParams sigp) |
static int | pgpImplSetDSA (DIGEST_CTX ctx, pgpDig dig, pgpDigParams sigp) |
static int | pgpImplSetELG (DIGEST_CTX ctx, pgpDig dig, pgpDigParams sigp) |
static int | pgpImplSetECDSA (DIGEST_CTX ctx, pgpDig dig, pgpDigParams sigp) |
static int | pgpImplErrChk (pgpDig dig, const char *msg, int rc, unsigned expected) |
static int | pgpImplAvailableCipher (pgpDig dig, int algo) |
static int | pgpImplAvailableDigest (pgpDig dig, int algo) |
static int | pgpImplAvailablePubkey (pgpDig dig, int algo) |
static int | pgpImplVerify (pgpDig dig) |
static int | pgpImplSign (pgpDig dig) |
static int | pgpImplGenerate (pgpDig dig) |
static int | pgpImplMpiItem (const char *pre, pgpDig dig, int itemno, const rpmuint8_t *p, const rpmuint8_t *pend) |
static void | pgpImplClean (void *impl) |
static void * | pgpImplFree (void *impl) |
static void * | pgpImplInit (void) |
Variables | |
struct pgpValTbl_s | pgpTagTbl [] |
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 | pgpSubTypeTbl [] |
Subtype (string, value) pairs. More... | |
struct pgpValTbl_s | pgpArmorTbl [] |
Armor (string, value) pairs. More... | |
struct pgpValTbl_s | pgpArmorKeyTbl [] |
Armor key (string, value) pairs. More... | |
pgpVSFlags | pgpDigVSFlags |
Disabler bits(s) for signature/digest checking. More... | |
pgpImplVecs_t * | pgpImplVecs |
OpenPGP constants and structures from RFC-2440.
Text from RFC-2440 in comments is Copyright (C) The Internet Society (1998). All Rights Reserved.
Definition in file rpmpgp.h.
#define PGPARMOR_ERROR PGPARMOR_ERR_NO_BEGIN_PGP |
#define pgpDigFree | ( | _dig | ) | ((pgpDig)rpmioFreePoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__)) |
#define pgpDigLink | ( | _dig | ) | ((pgpDig)rpmioLinkPoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__)) |
#define pgpDigUnlink | ( | _dig | ) | ((pgpDig)rpmioUnlinkPoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__)) |
typedef int(* pgpImplMpiItem_t)(const char *pre, pgpDig dig, int itemno, const rpmuint8_t *p,const rpmuint8_t *pend) |
typedef int(* pgpImplSet_t)(DIGEST_CTX ctx, pgpDig dig, pgpDigParams sigp) |
typedef struct pgpImplVecs_s pgpImplVecs_t |
typedef struct pgpValTbl_s * pgpValTbl |
Definition at line 1806 of file rpmpgp.h.
References pgpImplVecs_s::_pgpAvailableCipher.
Definition at line 1817 of file rpmpgp.h.
References pgpImplVecs_s::_pgpAvailableDigest.
Definition at line 1828 of file rpmpgp.h.
References pgpImplVecs_s::_pgpAvailablePubkey.
Definition at line 1882 of file rpmpgp.h.
References pgpImplVecs_s::_pgpClean.
Referenced by pgpDigClean().
Definition at line 1795 of file rpmpgp.h.
References pgpImplVecs_s::_pgpErrChk.
Definition at line 1894 of file rpmpgp.h.
References pgpImplVecs_s::_pgpFree.
Referenced by pgpDigFini().
Definition at line 1861 of file rpmpgp.h.
References pgpImplVecs_s::_pgpGenerate.
Referenced by pgpDigNew().
Definition at line 1903 of file rpmpgp.h.
References pgpImplVecs_s::_pgpInit.
Referenced by pgpDigNew().
|
inlinestatic |
Definition at line 1872 of file rpmpgp.h.
References pgpImplVecs_s::_pgpMpiItem, dig, and p.
Referenced by pgpPrtPubkeyParams(), and pgpPrtSigParams().
|
inlinestatic |
Definition at line 1768 of file rpmpgp.h.
References pgpImplVecs_s::_pgpSetDSA, ctx, dig, and sigp.
Referenced by rpmbcExportSignature(), and rpmnsProbeSignature().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 1759 of file rpmpgp.h.
References pgpImplVecs_s::_pgpSetRSA, ctx, dig, and sigp.
Referenced by rpmnsProbeSignature().
Definition at line 1850 of file rpmpgp.h.
References pgpImplVecs_s::_pgpSign.
Referenced by rpmbcExportSignature().
Definition at line 1839 of file rpmpgp.h.
References pgpImplVecs_s::_pgpVerify.
Referenced by rpmnsProbeSignature().
Definition at line 864 of file rpmbc.c.
References be, NULL, pgpGetPubkey(), pgpPubkeyFingerprint(), PGPTAG_PUBLIC_KEY, pkt, pktlen, xmalloc, and xx.
Referenced by pgpDigNew().
int rpmbcExportSignature | ( | pgpDig | dig, |
DIGEST_CTX | ctx | ||
) |
Definition at line 923 of file rpmbc.c.
References assert(), be, h, NULL, pgpGetPubkey(), pgpGetSignature(), pgpImplSetDSA(), pgpImplSign(), PGPSIGTYPE_BINARY, PGPSUBTYPE_EXPORTABLE_CERT, PGPSUBTYPE_ISSUER_KEYID, PGPSUBTYPE_REVOCABLE, PGPSUBTYPE_SIG_CREATE_TIME, PGPSUBTYPE_SIG_EXPIRE_TIME, PGPTAG_SIGNATURE, pkt, pktlen, rpmDigestUpdate(), sigp, xmalloc, and xx.
Referenced by writeRPM().
pgpVSFlags pgpDigVSFlags |
Disabler bits(s) for signature/digest checking.
Definition at line 1104 of file rpmpgp.c.
Referenced by headerCheck(), pgpDigNew(), rpmcliAllArgCallback(), rpmReadPackageFile(), rpmtsSetVSFlags(), and rpmtsVSFlags().
pgpImplVecs_t* pgpImplVecs |
Definition at line 38 of file rpmpgp.c.
Referenced by rpmioAllArgCallback().