From a6142dbdbc5783043deb847dc64998c421860941 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 30 Mar 2017 15:18:45 +0200 Subject: gpg: Remove the use of the signature information from a KBX. * g10/keydb.c (keyblock_cache): Remove field SIGSTATUS. (keyblock_cache_clear): Adjust for that removal. (parse_keyblock_image): Remove arg SIGSTATUS. Remove the signature cache setting; this is now done in the parser. (keydb_get_keyblock): Do not set SIGSTATUS. (build_keyblock_image): Remove arg SIGSTATUS and simplify. Change caller. * kbx/keybox-blob.c: Explain that the signature information is not anymore used. (_keybox_create_openpgp_blob): Remove arg SIGSTATUS and change callers. * kbx/keybox-search.c (keybox_get_keyblock): Remove arg R_SIGSTATUS and change callers. * kbx/keybox-update.c (keybox_insert_keyblock): Likewise. -- This thing was too complicated and has been replaced by the new ring trust packet code. Signed-off-by: Werner Koch --- kbx/keybox-search.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'kbx/keybox-search.c') diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c index cc114c64c..56515d16a 100644 --- a/kbx/keybox-search.c +++ b/kbx/keybox-search.c @@ -1048,23 +1048,20 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc, /* Return the last found keyblock. Returns 0 on success and stores a - new iobuf at R_IOBUF and a signature status vector at R_SIGSTATUS - in that case. R_UID_NO and R_PK_NO are used to retun the number of - the key or user id which was matched the search criteria; if not - known they are set to 0. */ + * new iobuf at R_IOBUF. R_UID_NO and R_PK_NO are used to retun the + * number of the key or user id which was matched the search criteria; + * if not known they are set to 0. */ gpg_error_t keybox_get_keyblock (KEYBOX_HANDLE hd, iobuf_t *r_iobuf, - int *r_pk_no, int *r_uid_no, u32 **r_sigstatus) + int *r_pk_no, int *r_uid_no) { gpg_error_t err; - const unsigned char *buffer, *p; + const unsigned char *buffer; size_t length; size_t image_off, image_len; size_t siginfo_off, siginfo_len; - u32 *sigstatus, n, n_sigs, sigilen; *r_iobuf = NULL; - *r_sigstatus = NULL; if (!hd) return gpg_error (GPG_ERR_INV_VALUE); @@ -1086,19 +1083,9 @@ keybox_get_keyblock (KEYBOX_HANDLE hd, iobuf_t *r_iobuf, &siginfo_off, &siginfo_len); if (err) return err; - n_sigs = get16 (buffer + siginfo_off); - sigilen = get16 (buffer + siginfo_off + 2); - p = buffer + siginfo_off + 4; - sigstatus = xtrymalloc ((1+n_sigs) * sizeof *sigstatus); - if (!sigstatus) - return gpg_error_from_syserror (); - sigstatus[0] = n_sigs; - for (n=1; n <= n_sigs; n++, p += sigilen) - sigstatus[n] = get32 (p); *r_pk_no = hd->found.pk_no; *r_uid_no = hd->found.uid_no; - *r_sigstatus = sigstatus; *r_iobuf = iobuf_temp_with_content (buffer+image_off, image_len); return 0; } -- cgit v1.2.3