diff options
author | Andre Heinecke <[email protected]> | 2016-08-10 12:12:33 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-08-10 12:12:33 +0000 |
commit | 09667a6006986a782af98ca1de4d6521e1b8f353 (patch) | |
tree | 9a3eb4e0b5717e25ec70a174fa75a33aec4f11fa /lang/cpp/src/context.h | |
parent | core: Handle ENCRYPT_SYMMETRIC also for sig & enc (diff) | |
download | gpgme-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 '')
-rw-r--r-- | lang/cpp/src/context.h | 5 |
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... |