diff options
author | Werner Koch <[email protected]> | 2016-09-07 07:26:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-09-07 07:26:11 +0000 |
commit | 120b14783c0312d782dc08ce4949a6209d5ccc7b (patch) | |
tree | 6cbd39d10a102aed9ce9b46e0e1d34c05909489e /src/keylist.c | |
parent | tests: Set passphrase cb in t-encrypt-mixed (diff) | |
download | gpgme-120b14783c0312d782dc08ce4949a6209d5ccc7b.tar.gz gpgme-120b14783c0312d782dc08ce4949a6209d5ccc7b.zip |
core,cpp: Extend the TOFU information.
* src/gpgme.h.in (struct _gpeme_tofu_info): Rename FIRSTSEEN to
SIGNFIRST and LASTSEEN to SIGNLAST. Add ENCRFIST and ENCRLAST.
* src/keylist.c (parse_tfs_record): Parse to ENCRFIRST and ENCRLAST.
* src/verify.c (parse_tofu_stats): Ditto.
* tests/run-keylist.c (main): Adjust and print encrypt stats.
* tests/run-verify.c (print_result): Ditto.
* lang/cpp/src/tofuinfo.h (TofuInfo): Rename firstSeen to signFirst
and lastSeen to signLast. Add encrCount, encrFirst and encrLast.
* lang/cpp/src/tofuinfo.cpp (encrCount, encrFirst, encrLast): New.
--
The latest GnuPG commits have the needed changes but we also allow the
use of currently released GnuPG version.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/keylist.c')
-rw-r--r-- | src/keylist.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/keylist.c b/src/keylist.c index 9f1e68db..f7912e6b 100644 --- a/src/keylist.c +++ b/src/keylist.c @@ -466,11 +466,25 @@ parse_tfs_record (gpgme_user_id_t uid, char **field, int nfield) err = _gpgme_strtoul_field (field[6], &uval); if (err) goto inv_engine; - ti->firstseen = uval; + ti->signfirst = uval; err = _gpgme_strtoul_field (field[7], &uval); if (err) goto inv_engine; - ti->lastseen = uval; + ti->signlast = uval; + + if (nfield > 9) + { + /* This condition is only to allow for gpg 2.1.15 - can + * eventually be removed. */ + err = _gpgme_strtoul_field (field[8], &uval); + if (err) + goto inv_engine; + ti->encrfirst = uval; + err = _gpgme_strtoul_field (field[9], &uval); + if (err) + goto inv_engine; + ti->encrlast = uval; + } /* Ready. */ uid->tofu = ti; |