From cc6069ac6ecd57dcbb808f28d54fd9f89dc55014 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 27 May 2019 10:40:38 +0200 Subject: gpg: Allow deletion of subkeys with --delete-[secret-]key. * common/userids.c (classify_user_id): Do not set the EXACT flag in the default case. * g10/export.c (exact_subkey_match_p): Make static, * g10/delkey.c (do_delete_key): Implement subkey only deleting. -- GnuPG-bug-id: 4457 --- common/userids.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/userids.c') diff --git a/common/userids.c b/common/userids.c index 181b48866..55bd85546 100644 --- a/common/userids.c +++ b/common/userids.c @@ -380,8 +380,10 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) } else if (!hexprefix) { - /* The fingerprint in an X.509 listing is often delimited by - colons, so we try to single this case out. */ + /* The fingerprint of an X.509 listing is often delimited by + * colons, so we try to single this case out. Note that the + * OpenPGP bang suffix is not supported here. */ + desc->exact = 0; mode = 0; hexlength = strspn (s, ":0123456789abcdefABCDEF"); if (hexlength == 59 && (!s[hexlength] || spacep (s+hexlength))) @@ -454,7 +456,6 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) } if (!mode) /* Default to substring search. */ { - desc->exact = 0; desc->u.name = s; mode = KEYDB_SEARCH_MODE_SUBSTR; } -- cgit v1.2.3