summaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-09-08 10:05:08 +0200
committerWerner Koch <wk@gnupg.org>2020-09-09 20:34:59 +0200
commitadec6a84f6ee176764391da358ae150f92b1f1e4 (patch)
tree87c059fa99ed5ee202bb1c67a9214b70c322ccf9 /sm
parentgpg,tools: Add handling of supported algorithms by a card. (diff)
downloadgnupg2-adec6a84f6ee176764391da358ae150f92b1f1e4.tar.xz
gnupg2-adec6a84f6ee176764391da358ae150f92b1f1e4.zip
kbx: Change X.509 S/N search definition.
* kbx/keybox-search-desc.h (struct keydb_search_desc): Do not overload SNLLEN with a hex flag. Add SNHEX. * kbx/keybox-search.c (keybox_search): Adjust. * common/userids.c (classify_user_id): Adjust. * sm/keydb.c (keydb_search_desc_dump): Adjust. * g10/keydb.c (keydb_search_desc_dump): Adjust. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'sm')
-rw-r--r--sm/keydb.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sm/keydb.c b/sm/keydb.c
index 70175a0dc..ca32162d1 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -1385,15 +1385,11 @@ keydb_search_desc_dump (struct keydb_search_desc *desc)
case KEYDB_SEARCH_MODE_ISSUER:
return xasprintf ("ISSUER: '%s'", desc->u.name);
case KEYDB_SEARCH_MODE_ISSUER_SN:
- return xasprintf ("ISSUER_SN: '%*s'",
- (int) (desc->snlen == -1
- ? strlen (desc->sn) : desc->snlen),
- desc->sn);
+ return xasprintf ("ISSUER_SN: '#%.*s/%s'",
+ (int)desc->snlen,desc->sn, desc->u.name);
case KEYDB_SEARCH_MODE_SN:
- return xasprintf ("SN: '%*s'",
- (int) (desc->snlen == -1
- ? strlen (desc->sn) : desc->snlen),
- desc->sn);
+ return xasprintf ("SN: '%.*s'",
+ (int)desc->snlen, desc->sn);
case KEYDB_SEARCH_MODE_SUBJECT:
return xasprintf ("SUBJECT: '%s'", desc->u.name);
case KEYDB_SEARCH_MODE_KEYGRIP: