aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-05-24 12:03:09 +0000
committerMaximilian Krambach <[email protected]>2018-05-24 12:03:09 +0000
commite38b8beb20a8cfe897c378e3c20be80b8256159e (patch)
tree2b95b796bcc609fedc20197de866a28aef20f554 /lang/cpp/src
parentjs: remove openpgp mode (diff)
parentjson: Put signature info before data output (diff)
downloadgpgme-e38b8beb20a8cfe897c378e3c20be80b8256159e.tar.gz
gpgme-e38b8beb20a8cfe897c378e3c20be80b8256159e.zip
Merge branch 'master' into javascript-binding
Diffstat (limited to 'lang/cpp/src')
-rw-r--r--lang/cpp/src/decryptionresult.cpp11
-rw-r--r--lang/cpp/src/decryptionresult.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/lang/cpp/src/decryptionresult.cpp b/lang/cpp/src/decryptionresult.cpp
index 1e815cbe..17524db9 100644
--- a/lang/cpp/src/decryptionresult.cpp
+++ b/lang/cpp/src/decryptionresult.cpp
@@ -155,6 +155,16 @@ std::vector<GpgME::DecryptionResult::Recipient> GpgME::DecryptionResult::recipie
return result;
}
+const char *GpgME::DecryptionResult::sessionKey() const
+{
+ return d ? d->res.session_key : nullptr;
+}
+
+const char *GpgME::DecryptionResult::symkeyAlgo() const
+{
+ return d ? d->res.symkey_algo : nullptr;
+}
+
class GpgME::DecryptionResult::Recipient::Private : public _gpgme_recipient
{
public:
@@ -231,6 +241,7 @@ std::ostream &GpgME::operator<<(std::ostream &os, const DecryptionResult &result
<< "\n unsupportedAlgorithm: " << protect(result.unsupportedAlgorithm())
<< "\n isWrongKeyUsage: " << result.isWrongKeyUsage()
<< "\n isDeVs " << result.isDeVs()
+ << "\n symkeyAlgo: " << protect(result.symkeyAlgo())
<< "\n recipients:\n";
const std::vector<DecryptionResult::Recipient> recipients = result.recipients();
std::copy(recipients.begin(), recipients.end(),
diff --git a/lang/cpp/src/decryptionresult.h b/lang/cpp/src/decryptionresult.h
index 57705b48..c270223d 100644
--- a/lang/cpp/src/decryptionresult.h
+++ b/lang/cpp/src/decryptionresult.h
@@ -77,6 +77,10 @@ public:
const char *fileName() const;
+ const char *sessionKey() const;
+
+ const char *symkeyAlgo() const;
+
class Recipient;
unsigned int numRecipients() const;