if (retCode != CKM_API_SUCCESS)
return retCode;
- Crypto::GStore &store =
- m_decider.getStore(data.type, policy, !encParams.iv.empty());
+ Crypto::GStore &store = m_decider.getStore(data.type,
+ policy,
+ !encParams.iv.empty());
- Token token;
+ Token token;
- auto digest = CryptoLogic::makeHash(name, owner, rootCred.clientUid);
- if (digest.empty())
- return CKM_API_ERROR_HASH_ERROR;
+ auto digest = CryptoLogic::makeHash(name, owner, rootCred.clientUid);
+ if (digest.empty())
+ return CKM_API_ERROR_HASH_ERROR;
- if (encParams.iv.empty()) {
- // Data are not encrypted, let's try to verify them
- Crypto::Data binaryData;
+ if (encParams.iv.empty()) {
+ // Data are not encrypted, let's try to verify them
+ Crypto::Data binaryData;
if (CKM_API_SUCCESS != (retCode = toBinaryData(data, binaryData)))
return retCode;
- token = store.import(binaryData,
- m_accessControl.isCCMode() ? "" : policy.password,
- encParams, digest);
- } else {
- token = store.import(data,
- m_accessControl.isCCMode() ? "" : policy.password,
- encParams, digest);
- }
+ token = store.import(binaryData,
+ m_accessControl.isCCMode() ? "" : policy.password,
+ encParams, digest);
+ } else {
+ token = store.import(data,
+ m_accessControl.isCCMode() ? "" : policy.password,
+ encParams, digest);
+ }
DB::Row row(std::move(token), name, CLIENT_ID_SYSTEM,
static_cast<int>(policy.extractable));