summaryrefslogtreecommitdiffstats
path: root/kbx/keybox-search-desc.h
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 /kbx/keybox-search-desc.h
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 'kbx/keybox-search-desc.h')
-rw-r--r--kbx/keybox-search-desc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kbx/keybox-search-desc.h b/kbx/keybox-search-desc.h
index 1167b1a6d..9a0df2846 100644
--- a/kbx/keybox-search-desc.h
+++ b/kbx/keybox-search-desc.h
@@ -75,7 +75,7 @@ struct keydb_search_desc
int (*skipfnc)(void *, u32 *, int);
void *skipfncvalue;
const unsigned char *sn;
- int snlen; /* -1 := sn is a hex string */
+ unsigned short snlen;
union {
const char *name;
unsigned char fpr[32];
@@ -83,6 +83,7 @@ struct keydb_search_desc
unsigned char grip[KEYGRIP_LEN];
unsigned char ubid[UBID_LEN];
} u;
+ byte snhex; /* SN above is a hexstring and not binary. */
byte fprlen; /* Only used with KEYDB_SEARCH_MODE_FPR. */
int exact; /* Use exactly this key ('!' suffix in gpg). */
};