Home GnuPG
Diffusion GnuPG 22739433e98b

gpg: Properly account for ring trust packets.

Description

gpg: Properly account for ring trust packets.

* g10/keyring.c (keyring_get_keyblock): Use the parser's packet count
instead of counting ourself.
* g10/packet.h (struct parse_packet_ctx_s): New field
'n_parsed_packets'.
(init_parse_packet): Initialize new field.
* g10/parse-packet.c (parse): Count packets.

The 'keyring' keystore depends on the number of packets for delete and
update operations. With the rework of the ring trust packets, the
trust packets were no longer properly accounted for leading to keyring
corruptions.

The 'keybox' store was not affected.

Details

Provenance
justusAuthored on May 8 2017, 2:24 PM
Parents
rG692208fd6c15: gpg: Fix typo.
Branches
Unknown
Tags
Unknown
Tasks
T3144: GPG generating strange / duplicate keys when adding subkeys on MacOS