54 while (p < data_end && *p)
84 for (
i = 1;
i < msglen - 2;
i++)
87 got_cksum = ((unsigned) (msg[msglen - 2]) << 8) + msg[msglen - 1];
88 if (my_cksum != got_cksum)
171 px_debug(
"unknown pubenc_sesskey pkt ver=%d", ver);
181 if (memcmp(key_id,
any_key, 8) != 0
182 && memcmp(key_id, pk->
key_id, 8) != 0)
184 px_debug(
"key_id's does not match");
213 px_debug(
"check_eme_pkcs1_v15 failed");
static void PGresult * res
int pullf_read_fixed(PullFilter *src, int len, uint8 *dst)
int pgp_expect_packet_end(PullFilter *pkt)
int pgp_rsa_decrypt(PGP_PubKey *pk, PGP_MPI *_c, PGP_MPI **m_p)
int pgp_elgamal_decrypt(PGP_PubKey *pk, PGP_MPI *_c1, PGP_MPI *_c2, PGP_MPI **msg_p)
int pgp_mpi_free(PGP_MPI *mpi)
int pgp_mpi_read(PullFilter *src, PGP_MPI **mpi)
static int decrypt_rsa(PGP_PubKey *pk, PullFilter *pkt, PGP_MPI **m_p)
static const uint8 any_key[]
static int decrypt_elgamal(PGP_PubKey *pk, PullFilter *pkt, PGP_MPI **m_p)
int pgp_parse_pubenc_sesskey(PGP_Context *ctx, PullFilter *pkt)
static uint8 * check_eme_pkcs1_v15(uint8 *data, int len)
static int control_cksum(uint8 *msg, int msglen)
@ PGP_PUB_RSA_ENCRYPT_SIGN
void px_debug(const char *fmt,...)
#define PXE_PGP_WRONG_KEY
#define PXE_PGP_CORRUPT_DATA
#define PXE_PGP_UNKNOWN_PUBALGO
uint8 sess_key[PGP_MAX_KEY]