Cpp: Handle empty recipients consistently
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 10 Aug 2016 12:12:33 +0000 (14:12 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 10 Aug 2016 12:12:33 +0000 (14:12 +0200)
commit09667a6006986a782af98ca1de4d6521e1b8f353
tree9a3eb4e0b5717e25ec70a174fa75a33aec4f11fa
parentb602d8bc7bd726afb52dc60cc07e4609e88d4511
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.
lang/cpp/src/context.cpp
lang/cpp/src/context.h