[Pkg-gnupg-commit] [gpgme] 304/412: core: Set the 'encrcount' field in gpgme_tofu_info_t.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:27:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit 1eefc2d43c0adb2ce516f8e3509ace2fb562e401
Author: Werner Koch <wk at gnupg.org>
Date: Wed Aug 24 16:04:54 2016 +0200
core: Set the 'encrcount' field in gpgme_tofu_info_t.
* src/verify.c (parse_tofu_stats): Set ENCRCOUNT field.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
src/verify.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/verify.c b/src/verify.c
index 075f1d6..e573b01 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -755,7 +755,7 @@ parse_tofu_user (gpgme_signature_t sig, char *args, gpgme_protocol_t protocol)
/* Parse a TOFU_STATS line and store it in the last tofu info of SIG.
*
- * TOFU_STATS <validity> <sign-count> 0 [<policy> [<tm1> <tm2>]]
+ * TOFU_STATS <validity> <sign-count> <encr-count> [<policy> [<tm1> <tm2>]]
*/
static gpgme_error_t
parse_tofu_stats (gpgme_signature_t sig, char *args)
@@ -790,7 +790,13 @@ parse_tofu_stats (gpgme_signature_t sig, char *args)
uval = USHRT_MAX;
ti->signcount = uval;
- /* We skip the 0, which is RFU. */
+ /* Parse the encr-count. */
+ err = _gpgme_strtoul_field (field[2], &uval);
+ if (err)
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
+ if (uval > USHRT_MAX)
+ uval = USHRT_MAX;
+ ti->encrcount = uval;
if (nfields == 3)
return 0; /* All mandatory fields parsed. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list