From 10df06ee8f9192309bf124872438f7c32457e1c6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sat, 21 May 2016 10:29:49 +0200 Subject: api: Return Tofu info for signatures. * src/gpgme.h.in (gpgme_tofu_policy_t): New. (gpgme_status_code_t): Add status codes for TOFU. (struct _gpgme_tofu_info, gpgme_tofu_info_t): New. (struct _gpgme_signature): Add field 'tofu'. * src/status-table.c (status_table): Add new codes. * src/verify.c: Include limits.h. (release_tofu_info): New. (release_op_data): Call that. (parse_tofu_user): New. (parse_tofu_stats): New. (parse_tofu_stats_long): New. (_gpgme_verify_status_handler): Handle TOFU status lines. * tests/run-verify.c (print_description): New. (print_result): print tofu info. Signed-off-by: Werner Koch --- src/status-table.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/status-table.c') diff --git a/src/status-table.c b/src/status-table.c index e70cb8bd..5850a361 100644 --- a/src/status-table.c +++ b/src/status-table.c @@ -124,6 +124,9 @@ static struct status_table_s status_table[] = { "SIG_SUBPACKET", GPGME_STATUS_SIG_SUBPACKET }, { "SIGEXPIRED", GPGME_STATUS_SIGEXPIRED }, { "SUCCESS", GPGME_STATUS_SUCCESS }, + { "TOFU_STATS", GPGME_STATUS_TOFU_STATS }, + { "TOFU_STATS_LONG", GPGME_STATUS_TOFU_STATS_LONG }, + { "TOFU_USER", GPGME_STATUS_TOFU_USER }, { "TRUNCATED", GPGME_STATUS_TRUNCATED }, { "TRUST_FULLY", GPGME_STATUS_TRUST_FULLY }, { "TRUST_MARGINAL", GPGME_STATUS_TRUST_MARGINAL }, -- cgit v1.2.3