summaryrefslogtreecommitdiffstats
path: root/g10/test-stubs.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2018-08-27 06:12:31 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2018-08-27 06:12:31 +0200
commitce2f71760155b71a71418fe145a557c99bd52290 (patch)
tree9c5f3eca5989d3ce2302d4f56930b3271615f075 /g10/test-stubs.c
parentg10: Fix undefined behavior when EOF in parsing packet for S2K. (diff)
downloadgnupg2-ce2f71760155b71a71418fe145a557c99bd52290.tar.xz
gnupg2-ce2f71760155b71a71418fe145a557c99bd52290.zip
g10: Change decryption key selection for public key encryption.
* g10/mainproc.c (struct mainproc_context): It's now pubkey_enc_list. (do_proc_packets): Remove the first arg CTRL. Fix call of proc_pubkey_enc. (release_list): Handle pubkey_enc_list. (proc_pubkey_enc): Remove the first arg CTRL. Simply put the packet to pubkey_enc_list. (print_pkenc_list): Remove the last arg FAILED. (proc_encrypted): Only call print_pkenc_list once. Handle DEK here. (proc_packets, proc_signature_packets, proc_signature_packets_by_fd) (proc_encryption_packets): Fix call of do_proc_packets. * g10/packet.h (struct pubkey_enc_list): Define. * g10/pubkey-enc.c (get_it): Change the second argument K. (get_session_key): Select session key by LIST, using enum_secret_keys. * g10/gpgv.c (get_session_key): Change the second argument K. * g10/test-stubs.c (get_session_key): Likewise. -- Collect all PKT_PUBKEY_ENC packets, and then, process the PKT_ENCRYPTED* packet. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/test-stubs.c')
-rw-r--r--g10/test-stubs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/test-stubs.c b/g10/test-stubs.c
index 1e1363266..a2b0d2906 100644
--- a/g10/test-stubs.c
+++ b/g10/test-stubs.c
@@ -253,7 +253,7 @@ read_key_from_file (ctrl_t ctrl, const char *fname, kbnode_t *r_keyblock)
* No encryption here but mainproc links to these functions.
*/
gpg_error_t
-get_session_key (ctrl_t ctrl, PKT_pubkey_enc *k, DEK *dek)
+get_session_key (ctrl_t ctrl, struct pubkey_enc_list *k, DEK *dek)
{
(void)ctrl;
(void)k;