Home GnuPG
Diffusion GnuPG 35b17550706c

gpg: Look up user ID to revoke by UID hash

Description

gpg: Look up user ID to revoke by UID hash

* g10/keyedit.c (find_userid_by_namehash, find_userid): New.
(keyedit_quick_revuid): Use find_userid() instead of iterating over the
nodes of the keyblock.
* tests/openpgp/quick-key-manipulation.scm: Add test for revoking a
user ID specified by its hash.

This makes it possible to specify the user ID to revoke as UID hash when
calling --quick-revoke-uid.