From 1cacd7d00a7b3de4a5e11ccce5ee6c50e0a5516d Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 1 Jun 2016 11:10:30 +0200 Subject: core: Set notation flags for verify. * src/gpgme.h.in (GPGME_STATUS_NOTATION_FLAGS): New. * src/status-table.c (status_table): Add new status. * src/verify.c (parse_notation): Handle flags. Also fix NOTATION_DATA in case gpg would not percent-escape spaces. (_gpgme_verify_status_handler): Handle flags. * tests/run-verify.c (print_result): Print notaion data. -- Note that this does only work with the soon to be released GnuPG 2.1.13. --- tests/run-verify.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'tests/run-verify.c') diff --git a/tests/run-verify.c b/tests/run-verify.c index df8cbf65..b1745163 100644 --- a/tests/run-verify.c +++ b/tests/run-verify.c @@ -110,6 +110,7 @@ static void print_result (gpgme_verify_result_t result) { gpgme_signature_t sig; + gpgme_sig_notation_t nt; gpgme_tofu_info_t ti; int count = 0; @@ -138,8 +139,20 @@ print_result (gpgme_verify_result_t result) sig->wrong_key_usage? " wrong-key-usage":"", sig->chain_model? " chain-model":"" ); - printf (" notations .: %s\n", - sig->notations? "yes":"no"); + for (nt = sig->notations; nt; nt = nt->next) + { + printf (" notation ..: '%s'\n", nt->name); + if (strlen (nt->name) != nt->name_len) + printf (" warning : name larger (%d)\n", nt->name_len); + printf (" flags ...:%s%s (0x%02x)\n", + nt->critical? " critical":"", + nt->human_readable? " human":"", + nt->flags); + if (nt->value) + printf (" value ...: '%s'\n", nt->value); + if ((nt->value?strlen (nt->value):0) != nt->value_len) + printf (" warning : value larger (%d)\n", nt->value_len); + } for (ti = sig->tofu; ti; ti = ti->next) { printf (" tofu addr .: %s\n", ti->address); -- cgit v1.2.3