Home GnuPG
Diffusion GnuPG 600df5259db0

gpg: Detect duplicate keys with --add-recipients.

Description

gpg: Detect duplicate keys with --add-recipients.

* g10/packet.h (struct pubkey_enc_list): Change to use a union to also
store symkey_enc data.  Adjust all users accordingly.
(struct pubkey_enc_info_item): New.
* g10/free-packet.c (free_pubkey_enc_list): New.
* g10/mainproc.c (release_list): Use it here.
* g10/decrypt.c (decrypt_message): and here.
* g10/encrypt.c (reencrypt_to_new_recipients): Record the used
pubkey_enc packets and pass them to write_pubkey_enc_from_list.
(write_pubkey_enc_from_list): Add arg restrict_pk_list and use it to
skip recipients already used.

Note that we here already prepare to better handle symkey_enc packets.

Details

Provenance
wernerAuthored on Fri, Sep 26, 2:43 PM
Parents
rGa4bd829aa675: w32: Fix gnupg_isatty.
Branches
Unknown
Tags
Unknown
Tasks
T1825: Add a re-encrypt to additional key