From 5aeb513916c7b1d37304e28571ad3daeda9e3cb0 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 6 Jun 2020 14:50:51 -0700 Subject: [PATCH] sbverify: refer to unused function The function print_certificate_store_certs() is currently commented out leading to an unused function warning. Make verbose a level and call this function for levels > 1 (meaning you have to specify -v -v to see it). Signed-off-by: James Bottomley --- src/sbverify.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sbverify.c b/src/sbverify.c index ac6705e..8f14f35 100644 --- a/src/sbverify.c +++ b/src/sbverify.c @@ -239,7 +239,7 @@ int main(int argc, char **argv) uint8_t *sig_buf; size_t sig_size; struct idc *idc; - bool verbose; + int verbose; BIO *idcbio; PKCS7 *p7; int sig_count = 0; @@ -247,7 +247,7 @@ int main(int argc, char **argv) status = VERIFY_FAIL; certs = X509_STORE_new(); list = 0; - verbose = false; + verbose = 0; detached_sig_filename = NULL; OpenSSL_add_all_digests(); @@ -282,7 +282,7 @@ int main(int argc, char **argv) list = 1; break; case 'v': - verbose = true; + verbose++; break; case 'V': version(); @@ -337,7 +337,8 @@ int main(int argc, char **argv) if (verbose || list) { print_signature_info(p7); - //print_certificate_store_certs(certs); + if (verbose > 1) + print_certificate_store_certs(certs); } if (list)