summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2015-05-28 09:28:09 +0200
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2015-05-28 14:17:19 +0200
commit60a4223c6d9ebeeb9173f4225f364d3c6df2bd99 (patch)
tree385b636e6431681a0d6f54730a84db580bde5451 /tests
parentea8494b35e25f61be832e2a5de22964fd616ead4 (diff)
downloadkey-manager-60a4223c6d9ebeeb9173f4225f364d3c6df2bd99.tar.gz
key-manager-60a4223c6d9ebeeb9173f4225f364d3c6df2bd99.tar.bz2
key-manager-60a4223c6d9ebeeb9173f4225f364d3c6df2bd99.zip
Make CryptoAlgorithm copyable.
[Problem] CryptoAlgorithm have to be copied on client side. One copy has to remain on client side for decryption and the other has to be serialized in client. [Solution] Unique_ptr replaced with shared_ptr so that CryptoAlgorithm copying is possible. [Verification] Run ckm-tests-internal -t SERIALIZATION_TEST Change-Id: Ied81a1414cc9c6b40206116895f713b779a685ac
Diffstat (limited to 'tests')
-rw-r--r--tests/test_serialization.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_serialization.cpp b/tests/test_serialization.cpp
index 4c6e5b52..d4ceb5f8 100644
--- a/tests/test_serialization.cpp
+++ b/tests/test_serialization.cpp
@@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE(Serialization_CryptoAlgorithm) {
addParam(ca,ParamName::ED_TAG_LEN, 128, true);
addParam(ca,ParamName::ED_AAD, AAD, true);
- CryptoAlgorithmSerializable input(std::move(ca));
+ CryptoAlgorithmSerializable input(ca);
CryptoAlgorithmSerializable output;
auto msg = MessageBuffer::Serialize(input);
RawBuffer buffer = msg.Pop();
@@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE(Serialization_CryptoAlgorithm_wrong_name) {
// unuspported param name
addParam(ca, static_cast<ParamName>(666), 666, true);
- CryptoAlgorithmSerializable input(std::move(ca));
+ CryptoAlgorithmSerializable input(ca);
CryptoAlgorithmSerializable output;
auto msg = MessageBuffer::Serialize(input);
RawBuffer buffer = msg.Pop();