From: Krzysztof Jackiewicz Date: Fri, 5 Apr 2019 09:44:10 +0000 (+0200) Subject: Setup verification algorithm if not provided X-Git-Tag: accepted/tizen/unified/20190602.221856~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F202873%2F3;p=platform%2Fcore%2Fsecurity%2Fkey-manager.git 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 --- 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);