Home GnuPG
Diffusion GnuPG 84c993d9325f

gpg: Store key origin for new userids during import merge.

Description

gpg: Store key origin for new userids during import merge.

* g10/import.c (apply_meta_data): Rename to ...
(insert_key_origin): this.  Factor code out to ...
(insert_key_origin_pk, insert_key_origin_uid): new funcs.
(import_one): Move insert_key_origin behind clean_key.
(merge_blocks): Add args options, origin, and url.
(append_uid): Rename to ...
(append_new_uid): this.  Add args options, curtime, origin, and url.
Call insert_key_origin_uid for new UIDs.

This is a straightforward change to handle new user ids.

How to test:

With an empty keyring run

gpg --with-key-origin --locate-key \
    --auto-key-locate clear,nodefault,wkd  wk@gnupg.org

and then append a new keyid using

gpg --with-key-origin --locate-key \
    --auto-key-locate clear,nodefault,wkd  wk@g10code.com

Works with my current key 80615870F5BAD690333686D0F2AD85AC1E42B367.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jul 25 2017, 10:19 AM
Parents
rGd40b4a41a8d6: dirmngr: Add annotation for fallthrough.
Branches
Unknown
Tags
Unknown