summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2019-04-05 11:44:10 +0200
committerTomasz Swierczek <t.swierczek@samsung.com>2019-05-20 11:08:01 +0200
commit0be32159737cb86cdc1a319d752cfdaa58b872f3 (patch)
tree723f4dc1bf840c5df57b1dfbe52af74da0845410
parent6a9b2661d5ebf635c46200632873cccfb154dae8 (diff)
downloadkey-manager-0be32159737cb86cdc1a319d752cfdaa58b872f3.tar.gz
key-manager-0be32159737cb86cdc1a319d752cfdaa58b872f3.tar.bz2
key-manager-0be32159737cb86cdc1a319d752cfdaa58b872f3.zip
Setup verification algorithm if not provided
Verification API has no knowledge about the algorithm type. It has to be derived from the key type. Change-Id: I2e0d094372e4bf8c28275544204e431c4023e391
-rw-r--r--src/manager/crypto/tz-backend/obj.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/manager/crypto/tz-backend/obj.cpp b/src/manager/crypto/tz-backend/obj.cpp
index 81aabaa..351f24e 100644
--- a/src/manager/crypto/tz-backend/obj.cpp
+++ b/src/manager/crypto/tz-backend/obj.cpp
@@ -85,7 +85,7 @@ int AKey::verify(const CryptoAlgorithm &alg, const RawBuffer &message,
// setup algorithm type basing on key type if it doesn't exist
if (!algWithType.getParam(ParamName::ALGO_TYPE, type)) {
- ThrowErr(Exc::Crypto::InputParam, "Invalid key type: ", "not given");
+ algWithType.setParam(ParamName::ALGO_TYPE, key2algo(m_type));
}
return Internals::verify(getBinary(), getPassword(), algWithType, message, sign);