diff options
author | Andre Heinecke <[email protected]> | 2016-08-24 11:59:37 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-08-24 11:59:37 +0000 |
commit | 7c5a4974b71c30e824cbfcb3a0a70064e5ed5adb (patch) | |
tree | 20f542c1c8e11fa50d7d8a1377a9ead9a5bb2b35 /lang/cpp/src/verificationresult.cpp | |
parent | Cpp: Use fpr field for primaryFingerprint (diff) | |
download | gpgme-7c5a4974b71c30e824cbfcb3a0a70064e5ed5adb.tar.gz gpgme-7c5a4974b71c30e824cbfcb3a0a70064e5ed5adb.zip |
Cpp: Add Key to signature
* lang/cpp/src/verificationresult.cpp,
lang/cpp/src/verificationresult.h (Signature::key): New.
Diffstat (limited to '')
-rw-r--r-- | lang/cpp/src/verificationresult.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lang/cpp/src/verificationresult.cpp b/lang/cpp/src/verificationresult.cpp index c32c8964..c62625d1 100644 --- a/lang/cpp/src/verificationresult.cpp +++ b/lang/cpp/src/verificationresult.cpp @@ -24,6 +24,7 @@ #include <notation.h> #include "result_p.h" #include "util.h" +#include "key.h" #include <gpgme.h> @@ -64,6 +65,10 @@ public: # endif scopy->next = 0; sigs.push_back(scopy); + // copy keys + if (scopy->key) { + keys.push_back(Key(scopy->key, true)); + } // copy notations: nota.push_back(std::vector<Nota>()); purls.push_back(0); @@ -107,6 +112,7 @@ public: std::vector<gpgme_signature_t> sigs; std::vector< std::vector<Nota> > nota; + std::vector<GpgME::Key> keys; std::vector<char *> purls; std::string file_name; }; @@ -366,6 +372,14 @@ std::vector<GpgME::Notation> GpgME::Signature::notations() const return result; } +GpgME::Key GpgME::Signature::key() const +{ + if (isNull()) { + return Key(); + } + return d->keys[idx]; +} + class GpgME::Notation::Private { public: |