aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/tofuinfo.cpp
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-09-07 07:26:11 +0000
committerWerner Koch <[email protected]>2016-09-07 07:26:11 +0000
commit120b14783c0312d782dc08ce4949a6209d5ccc7b (patch)
tree6cbd39d10a102aed9ce9b46e0e1d34c05909489e /lang/cpp/src/tofuinfo.cpp
parenttests: Set passphrase cb in t-encrypt-mixed (diff)
downloadgpgme-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 'lang/cpp/src/tofuinfo.cpp')
-rw-r--r--lang/cpp/src/tofuinfo.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/lang/cpp/src/tofuinfo.cpp b/lang/cpp/src/tofuinfo.cpp
index ade262bb..bb67fc8c 100644
--- a/lang/cpp/src/tofuinfo.cpp
+++ b/lang/cpp/src/tofuinfo.cpp
@@ -123,14 +123,29 @@ unsigned short GpgME::TofuInfo::signCount() const
return isNull() ? 0 : d->mInfo->signcount;
}
-unsigned long GpgME::TofuInfo::firstSeen() const
+unsigned short GpgME::TofuInfo::encrCount() const
{
- return isNull() ? 0 : d->mInfo->firstseen;
+ return isNull() ? 0 : d->mInfo->encrcount;
}
-unsigned long GpgME::TofuInfo::lastSeen() const
+unsigned long GpgME::TofuInfo::signFirst() const
{
- return isNull() ? 0 : d->mInfo->lastseen;
+ return isNull() ? 0 : d->mInfo->signfirst;
+}
+
+unsigned long GpgME::TofuInfo::signLast() const
+{
+ return isNull() ? 0 : d->mInfo->signlast;
+}
+
+unsigned long GpgME::TofuInfo::encrFirst() const
+{
+ return isNull() ? 0 : d->mInfo->encrfirst;
+}
+
+unsigned long GpgME::TofuInfo::encrLast() const
+{
+ return isNull() ? 0 : d->mInfo->encrlast;
}
std::ostream &GpgME::operator<<(std::ostream &os, const GpgME::TofuInfo &info)
@@ -141,8 +156,11 @@ std::ostream &GpgME::operator<<(std::ostream &os, const GpgME::TofuInfo &info)
<< "\n validity: " << info.validity()
<< "\n policy: " << info.policy()
<< "\n signcount: "<< info.signCount()
- << "\n firstseen: "<< info.firstSeen()
- << "\n lastseen: " << info.lastSeen()
+ << "\n signfirst: "<< info.signFirst()
+ << "\n signlast: " << info.signLast()
+ << "\n encrcount: "<< info.encrCount()
+ << "\n encrfirst: "<< info.encrFirst()
+ << "\n encrlast: " << info.encrLast()
<< '\n';
}
return os << ")";