18 #if defined(_RPMPGP_INTERNAL)
27 struct pgpDigParams_s {
47 #define PGPDIG_SAVED_TIME (1 << 0)
48 #define PGPDIG_SAVED_ID (1 << 1)
57 struct pgpDigParams_s signature;
58 struct pgpDigParams_s pubkey;
61 const char * pubkey_algoN;
63 const char * hash_algoN;
77 int (*findPubkey) (
void * _ts,
void * _dig)
105 #if defined(__LCLINT__)
997 #define PGPARMOR_ERROR PGPARMOR_ERR_NO_BEGIN_PGP
1033 #if defined(_RPMPGP_INTERNAL)
1052 unsigned int pktlen;
1081 size_t nb = (nbytes <=
sizeof(i) ? nbytes :
sizeof(i));
1083 i = (i << 8) | *s++;
1098 *lenp = (
unsigned int) *s++;
1101 *lenp = (
unsigned int) ((((
unsigned)s[0]) - 192) << 8) + (unsigned)s[1] + 192;
1119 return (
unsigned int) ((p[0] << 8) | p[1]);
1146 static char hex[] =
"0123456789abcdef";
1147 while (nbytes-- > 0) {
1149 i = (
unsigned int) *s++;
1150 *t++ = hex[ (i >> 4) & 0xf ];
1151 *t++ = hex[ (i ) & 0xf ];
1168 static char prbuf[8*BUFSIZ];
1185 static char prbuf[8*BUFSIZ];
1187 sprintf(t,
"[%4u]: ",
pgpGrab(p, 2));
1204 if (vs->
val == (
int)val)
1206 }
while ((++vs)->val != -1);
1222 size_t vlen = strlen(vs->
str);
1223 if (vlen <= (
size_t)(se-s) && !strncmp(s, vs->
str, vlen))
1225 }
while ((++vs)->val != -1);
1248 #if defined(_RPMPGP_INTERNAL)
1261 #if defined(_RPMPGP_INTERNAL)
1285 #if defined(_RPMPGP_INTERNAL)
1296 #if defined(_RPMPGP_INTERNAL)
1309 #if defined(_RPMPGP_INTERNAL)
1349 #if defined(_RPMPGP_INTERNAL)
1447 #define pgpDigUnlink(_dig) \
1448 ((pgpDig)rpmioUnlinkPoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__))
1458 #define pgpDigLink(_dig) \
1459 ((pgpDig)rpmioLinkPoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__))
1469 #define pgpDigFree(_dig) \
1470 ((pgpDig)rpmioFreePoolItem((rpmioItem)(_dig), __FUNCTION__, __FILE__, __LINE__))
1578 int (*findPubkey) (
void *ts,
void *dig),
1600 unsigned int val = (
unsigned int) *p++;
1609 tag = (
pgpTag)(val & 0x3f);
1611 tag = (
pgpTag)((val >> 2) & 0xf);
1648 #define CRC24_INIT 0xb704ce
1649 #define CRC24_POLY 0x1864cfb
1665 crc ^= (*octets++) << 16;
1666 for (i = 0; i < 8; i++) {
1668 if (crc & 0x1000000)
1672 return crc & 0xffffff;
1719 typedef void * (*pgpImplFree_t) (
void * impl)
1724 typedef void * (*pgpImplInit_t) (void)
1763 return (*pgpImplVecs->
_pgpSetRSA) (ctx, dig, sigp);
1772 return (*pgpImplVecs->
_pgpSetDSA) (ctx, dig, sigp);
1781 return (*pgpImplVecs->
_pgpSetELG) (ctx, dig, sigp);
1800 ? (*pgpImplVecs->
_pgpErrChk) (dig, msg, rc, expected)
1877 return (*pgpImplVecs->
_pgpMpiItem) (pre, dig, itemno, p, pend);
1898 return (*pgpImplVecs->
_pgpFree) (impl);
1907 return (*pgpImplVecs->
_pgpInit) ();