diff options
author | Werner Koch <[email protected]> | 2019-05-27 08:40:38 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-05-27 09:41:35 +0000 |
commit | d9b31d3a20b89a5ad7e9a2158b6da63a9a37fa8a (patch) | |
tree | 3526f573373af50b928a5ec3cf8fee2e2f2fc45b /common/userids.c | |
parent | agent: Stop scdaemon after reload when disable_scdaemon. (diff) | |
download | gnupg-d9b31d3a20b89a5ad7e9a2158b6da63a9a37fa8a.tar.gz gnupg-d9b31d3a20b89a5ad7e9a2158b6da63a9a37fa8a.zip |
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
Diffstat (limited to '')
-rw-r--r-- | common/userids.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/userids.c b/common/userids.c index 01f2cd84b..00f26b720 100644 --- a/common/userids.c +++ b/common/userids.c @@ -351,8 +351,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))) @@ -414,7 +416,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; } |