Commit Graph

6 Commits

Author SHA1 Message Date
Andre Heinecke
4d3f33d0e9 cpp: Don't include gpgme.h in tofuinfo header
* lang/cpp/src/tofuinfo.h: Don't include gpgme.h

--
No public header should include gpgme.h
2016-11-04 12:26:46 +01:00
Andre Heinecke
32baac8cde cpp: Declare sizes of tofu-info enums
* lang/cpp/src/tofuinfo.h (Policy, Validity): Declare sizes.

--
This is a quick ABI break before the release so that we can
easier extend them in the future. All new enums in public API
should be declared with a size from now on.
2016-09-16 16:58:38 +02:00
Werner Koch
120b14783c
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 <wk@gnupg.org>
2016-09-07 09:26:11 +02:00
Andre Heinecke
de7b67f9b2 Cpp: Change firstSeen / lastSeen return values
* lang/cpp/src/tofuinfo.cpp,
lang/cpp/src/tofuinfo.h (TofuInfo::firstSeen, TofuInfo::lastSeen):
Change return values to unsigned long and update doc.
2016-08-25 11:41:57 +02:00
Andre Heinecke
799b168243 Cpp: Move tofuinfo from signature to userid
* lang/cpp/src/key.cpp (UserID::tofuInfo): New.
* lang/cpp/src/key.h: Update accordingly.
* lang/cpp/src/tofuinfo.cpp: Remove dropped fields.
* lang/cpp/src/tofuinfo.h: Update accordingly.
* lang/cpp/src/verificationresult.cpp,
lang/cpp/src/verificationresult.h: Remove tofu info.
* lang/qt/tests/t-tofuinfo.cpp: Disable for now.

--
With be4ff75d7 Tofu info now lives with a UserID
Object. While this breaks API it was not yet released.
2016-08-23 16:44:17 +02:00
Andre Heinecke
93c5d420fc Cpp: Add TofuInfo to signatures
* lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h: New class.
* lang/cpp/src/verificationresult.cpp (Signature::tofuInfo): New.
(VerificationResult::Private): Handle tofu info.
(GpgME::operator<<(std::ostream &os, const Signature &sig)): Include
TofuInfo in dump.
* lang/cpp/src/verificationresult.h (Signature::tofuInfo): New.
* lang/cpp/src/Makefile.am (main_sources, gpgmepp_headers): Add
new files.
* configure.ac (LIBGPGMEPP_LT_REVISION): Bump for new API.
2016-07-01 16:52:34 +02:00