diff options
author | Werner Koch <[email protected]> | 2013-01-07 20:14:52 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-01-07 20:14:52 +0000 |
commit | f6d7b3f1ee5eed32bc3257c99cb878091d26c482 (patch) | |
tree | ff98f2dcb3b7593d8415567fcdecbbae8f9fac85 /kbx/keybox.h | |
parent | New function log_clock. (diff) | |
download | gnupg-f6d7b3f1ee5eed32bc3257c99cb878091d26c482.tar.gz gnupg-f6d7b3f1ee5eed32bc3257c99cb878091d26c482.zip |
gpg: Set the node flags while retrieving a keyblock.
* g10/keydb.c (parse_keyblock_image): Add args PK_NO and UID_NO and
set the note flags accordingly.
(keydb_get_keyblock): Transfer PK_NO and UID_NO to parse_keyblock_image.
* kbx/keybox-search.c (blob_cmp_fpr, blob_cmp_fpr_part)
(blob_cmp_name, blob_cmp_mail): Return the key/user number.
(keybox_search): Set the key and user number into the found struct.
(keybox_get_keyblock): Add args R_PK_NO and R_UID_NO and set them from
the found struct.
--
getkey.c needs to know whether the correct subkey was found. Thus we
need to set the node flags the same way we did it with the keyring
storage.
Diffstat (limited to 'kbx/keybox.h')
-rw-r--r-- | kbx/keybox.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kbx/keybox.h b/kbx/keybox.h index 03a9245a3..4f7e23da0 100644 --- a/kbx/keybox.h +++ b/kbx/keybox.h @@ -81,8 +81,8 @@ int keybox_lock (KEYBOX_HANDLE hd, int yes); int _keybox_write_header_blob (FILE *fp); /*-- keybox-search.c --*/ -gpg_error_t keybox_get_keyblock (KEYBOX_HANDLE hd, - iobuf_t *r_iobuf, u32 **sigstatus); +gpg_error_t keybox_get_keyblock (KEYBOX_HANDLE hd, iobuf_t *r_iobuf, + int *r_uid_no, int *r_pk_no, u32 **sigstatus); #ifdef KEYBOX_WITH_X509 int keybox_get_cert (KEYBOX_HANDLE hd, ksba_cert_t *ret_cert); #endif /*KEYBOX_WITH_X509*/ @@ -114,7 +114,6 @@ int keybox_compress (KEYBOX_HANDLE hd); /*-- --*/ #if 0 -int keybox_get_keyblock (KEYBOX_HANDLE hd, KBNODE *ret_kb); int keybox_locate_writable (KEYBOX_HANDLE hd); int keybox_search_reset (KEYBOX_HANDLE hd); int keybox_search (KEYBOX_HANDLE hd, KEYDB_SEARCH_DESC *desc, size_t ndesc); |