Fix indentation 49/288049/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 9 Feb 2023 14:34:03 +0000 (15:34 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 9 Feb 2023 14:49:09 +0000 (15:49 +0100)
Change-Id: Ic98aea95c673fb94dc022eee9cac66fc4d1a5b9e

src/manager/service/ckm-logic.cpp

index a8cad08..330423a 100644 (file)
@@ -103,8 +103,7 @@ int toBinaryData(const Crypto::Data &input, Crypto::Data &output)
 
                output = Crypto::Data(input.type, output_key->getDER());
        } else if (input.type.isCertificate() || input.type.isChainCert()) {
-               CertificateShPtr cert = CKM::Certificate::create(input.data,
-                                                               DataFormat::FORM_DER);
+               CertificateShPtr cert = CKM::Certificate::create(input.data, DataFormat::FORM_DER);
 
                if (cert.get() == NULL) {
                        LogDebug("provided binary data is not valid certificate data");
@@ -557,9 +556,7 @@ int CKMLogic::getKeyForService(
        return tryRet([&] {
                // Key is for internal service use. It won't be exported to the client
                Crypto::GObjUPtr obj;
-               int retCode = readDataHelper(false, cred, DataType::DB_KEY_FIRST, name, owner,
-                                                                        pass, obj);
-
+               int retCode = readDataHelper(false, cred, DataType::DB_KEY_FIRST, name, owner, pass, obj);
                if (retCode == CKM_API_SUCCESS)
                        key = std::move(obj);
 
@@ -774,7 +771,10 @@ Crypto::GObjUPtr CKMLogic::rowToObject(
                store.destroy(row);
 
                // import it to store with new scheme: data -> pass(data)
-               Token token = store.import(Crypto::Data(row.dataType, row.data), pass, Crypto::EncryptionParams(), hash);
+               Token token = store.import(Crypto::Data(row.dataType, row.data),
+                                                                  pass,
+                                                                  Crypto::EncryptionParams(),
+                                                                  hash);
 
                // get it from the store (it can be different than the data we imported into store)
                obj = store.getObject(token, pass);
@@ -921,7 +921,7 @@ RawBuffer CKMLogic::getData(
        int retCode = tryRet([&] {
                Crypto::GObjUPtr obj;
                int retCode = readDataHelper(true, cred, dataType, name, owner,
-                                                                password, obj, objDataType);
+                                                                        password, obj, objDataType);
 
                if (retCode == CKM_API_SUCCESS)
                        rowData = obj->getBinary();
@@ -1092,14 +1092,12 @@ RawBuffer CKMLogic::getDataList(
                // system database
                if (m_accessControl.isSystemService(cred)) {
                        // lookup system DB
-                       retCode = getDataListHelper(Credentials(SYSTEM_DB_UID,
-                                                                                                       CLIENT_ID_SYSTEM),
+                       retCode = getDataListHelper(Credentials(SYSTEM_DB_UID, CLIENT_ID_SYSTEM),
                                                                                dataType,
                                                                                systemVector);
                } else {
                        // user - lookup system, then client DB
-                       retCode = getDataListHelper(Credentials(SYSTEM_DB_UID,
-                                                                                                       cred.client),
+                       retCode = getDataListHelper(Credentials(SYSTEM_DB_UID, cred.client),
                                                                                dataType,
                                                                                systemVector);
 
@@ -1146,9 +1144,7 @@ int CKMLogic::importInitialData(
                        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;
 
@@ -1606,7 +1602,7 @@ RawBuffer CKMLogic::createSignature(
                retCode = tryRet([&] {
                        Crypto::GObjUPtr obj;
                        int retCode = readDataHelper(false, cred, DataType::DB_KEY_FIRST, privateKeyName,
-                                                    owner, password, obj);
+                                                                                owner, password, obj);
 
                        if (retCode == CKM_API_SUCCESS)
                                signature = obj->sign(cryptoAlg, message);
@@ -1637,7 +1633,7 @@ RawBuffer CKMLogic::verifySignature(
                // rather than private key from the same PKCS.
                Crypto::GObjUPtr obj;
                int retCode = readDataHelper(false, cred, DataType::CERTIFICATE,
-                                            publicKeyOrCertName, owner, password, obj);
+                                                                        publicKeyOrCertName, owner, password, obj);
 
                if (retCode == CKM_API_ERROR_DB_ALIAS_UNKNOWN)
                        retCode = readDataHelper(false, cred, DataType::DB_KEY_FIRST,