mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
kbx,gpg: Allow lookup using a UBID.
* common/userids.c (classify_user_id): Detect UBIDs. * kbx/backend-cache.c (blob_table_put): Store the public key type. (be_cache_search): Add search mode for UBIDs. * kbx/backend.h (struct db_request_part_s): Add cache.seqno_ubid. * g10/keydb.c (keydb_search_desc_dump): Fix printing of keygrip. Add ubid printing. * g10/call-keyboxd.c (keydb_search): Support search by UBID. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
280e9c9cfa
commit
4be79b5abe
7 changed files with 64 additions and 7 deletions
|
@ -1017,6 +1017,14 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc,
|
|||
}
|
||||
break;
|
||||
|
||||
case KEYDB_SEARCH_MODE_UBID:
|
||||
{
|
||||
unsigned char hexubid[20 * 2 + 1];
|
||||
bin2hex (desc[0].u.grip, 20, hexubid);
|
||||
snprintf (line, sizeof line, "SEARCH ^%s", hexubid);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEYDB_SEARCH_MODE_FIRST:
|
||||
snprintf (line, sizeof line, "SEARCH");
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue