From 799b168243e6499ac01bf59e0656547f353a2589 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 23 Aug 2016 16:40:21 +0200 Subject: 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. --- lang/cpp/src/tofuinfo.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'lang/cpp/src/tofuinfo.cpp') diff --git a/lang/cpp/src/tofuinfo.cpp b/lang/cpp/src/tofuinfo.cpp index c27a59ed..fe8f051f 100644 --- a/lang/cpp/src/tofuinfo.cpp +++ b/lang/cpp/src/tofuinfo.cpp @@ -31,12 +31,6 @@ public: Private(gpgme_tofu_info_t info) : mInfo(info ? new _gpgme_tofu_info(*info) : nullptr) { - if (mInfo && mInfo->fpr) { - mInfo->fpr = strdup(mInfo->fpr); - } - if (mInfo && mInfo->address) { - mInfo->address = strdup(mInfo->address); - } if (mInfo && mInfo->description) { mInfo->description = strdup(mInfo->description); } @@ -45,12 +39,6 @@ public: Private(const Private &other) : mInfo(other.mInfo) { - if (mInfo && mInfo->fpr) { - mInfo->fpr = strdup(mInfo->fpr); - } - if (mInfo && mInfo->address) { - mInfo->address = strdup(mInfo->address); - } if (mInfo && mInfo->description) { mInfo->description = strdup(mInfo->description); } @@ -59,10 +47,6 @@ public: ~Private() { if (mInfo) { - std::free(mInfo->fpr); - mInfo->fpr = nullptr; - std::free(mInfo->address); - mInfo->address = nullptr; std::free(mInfo->description); mInfo->description = nullptr; @@ -129,16 +113,6 @@ GpgME::TofuInfo::Policy GpgME::TofuInfo::policy() const } } -const char *GpgME::TofuInfo::fingerprint() const -{ - return isNull() ? nullptr : d->mInfo->fpr; -} - -const char *GpgME::TofuInfo::address() const -{ - return isNull() ? nullptr : d->mInfo->address; -} - const char *GpgME::TofuInfo::description() const { return isNull() ? nullptr : d->mInfo->description; @@ -163,9 +137,7 @@ std::ostream &GpgME::operator<<(std::ostream &os, const GpgME::TofuInfo &info) { os << "GpgME::Signature::TofuInfo("; if (!info.isNull()) { - os << "\n address: " << protect(info.address()) - << "\n fpr: " << protect(info.fingerprint()) - << "\n desc: " << protect(info.description()) + os << "\n desc: " << protect(info.description()) << "\n validity: " << info.validity() << "\n policy: " << info.policy() << "\n signcount: "<< info.signCount() -- cgit v1.2.3