From 477b5a0e24f3b62a470f9684e22e36a2c7735274 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 10 May 2013 13:06:48 -0400 Subject: Fix pgp_pub_decrypt() so it works for secret keys with passwords. Per report from Keith Fiske. Marko Kreen --- contrib/pgcrypto/pgp-pubkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/pgcrypto/pgp-pubkey.c') diff --git a/contrib/pgcrypto/pgp-pubkey.c b/contrib/pgcrypto/pgp-pubkey.c index 283e0ec17e3..9651d5e89f2 100644 --- a/contrib/pgcrypto/pgp-pubkey.c +++ b/contrib/pgcrypto/pgp-pubkey.c @@ -408,16 +408,16 @@ process_secret_key(PullFilter *pkt, PGP_PubKey **pk_p, case PGP_PUB_RSA_SIGN: case PGP_PUB_RSA_ENCRYPT: case PGP_PUB_RSA_ENCRYPT_SIGN: - res = pgp_mpi_read(pkt, &pk->sec.rsa.d); + res = pgp_mpi_read(pf_key, &pk->sec.rsa.d); if (res < 0) break; - res = pgp_mpi_read(pkt, &pk->sec.rsa.p); + res = pgp_mpi_read(pf_key, &pk->sec.rsa.p); if (res < 0) break; - res = pgp_mpi_read(pkt, &pk->sec.rsa.q); + res = pgp_mpi_read(pf_key, &pk->sec.rsa.q); if (res < 0) break; - res = pgp_mpi_read(pkt, &pk->sec.rsa.u); + res = pgp_mpi_read(pf_key, &pk->sec.rsa.u); if (res < 0) break; break; -- cgit v1.2.3