aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/context.h
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-08-10 12:12:33 +0000
committerAndre Heinecke <[email protected]>2016-08-10 12:12:33 +0000
commit09667a6006986a782af98ca1de4d6521e1b8f353 (patch)
tree9a3eb4e0b5717e25ec70a174fa75a33aec4f11fa /lang/cpp/src/context.h
parentcore: Handle ENCRYPT_SYMMETRIC also for sig & enc (diff)
downloadgpgme-09667a6006986a782af98ca1de4d6521e1b8f353.tar.gz
gpgme-09667a6006986a782af98ca1de4d6521e1b8f353.zip
Cpp: Handle empty recipients consistently
* lang/cpp/src/context.cpp (Context::getKeysFromRecipients): New helper. (Context::encrypt, Context::startEncryption, Context::signAndEncrypt) (Context::startCombinedSigningAndEncryption): Use new helper. * lang/cpp/src/context.h (Context::getKeysFromRecipients): Add as private helper. -- bf776ce was incomplete as the code to handle recpients was duplicated four times. This is now unified and constently uses a nullptr instead of an empty array.
Diffstat (limited to 'lang/cpp/src/context.h')
-rw-r--r--lang/cpp/src/context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h
index 70ab079f..7d7f53a6 100644
--- a/lang/cpp/src/context.h
+++ b/lang/cpp/src/context.h
@@ -369,6 +369,11 @@ public:
return d;
}
private:
+ // Helper functions that need to be context because they rely
+ // on the "Friendlyness" of context to access the gpgme types.
+ gpgme_key_t *const getKeysFromRecipients(const std::vector<Key> &recipients);
+
+private:
Private *const d;
private: // disable...