From 120b14783c0312d782dc08ce4949a6209d5ccc7b Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 7 Sep 2016 09:26:11 +0200 Subject: 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 --- lang/cpp/src/tofuinfo.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lang/cpp/src/tofuinfo.h') diff --git a/lang/cpp/src/tofuinfo.h b/lang/cpp/src/tofuinfo.h index eb5dbcc5..ec253e96 100644 --- a/lang/cpp/src/tofuinfo.h +++ b/lang/cpp/src/tofuinfo.h @@ -93,11 +93,20 @@ public: /* Number of signatures seen for this binding. Capped at USHRT_MAX. */ unsigned short signCount() const; + /* Number of encryption done to this binding. Capped at USHRT_MAX. */ + unsigned short encrCount() const; + /** Number of seconds since epoch when the first message was verified */ - unsigned long firstSeen() const; + unsigned long signFirst() const; /** Number of seconds since epoch when the last message was verified */ - unsigned long lastSeen() const; + unsigned long signLast() const; + + /** Number of seconds since epoch when the first message was encrypted */ + unsigned long encrFirst() const; + + /** Number of seconds since epoch when the last message was encrypted */ + unsigned long encrLast() const; /* If non-NULL a human readable string summarizing the TOFU data. */ const char *description() const; -- cgit v1.2.3