CKM: Saving unexportable data is now allowed 31/288831/5
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 23 Feb 2023 09:07:34 +0000 (10:07 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 16 Mar 2023 10:10:36 +0000 (11:10 +0100)
Change-Id: Idfc450ee67d26a0389c62076b8401339c6404362

src/ckm/unprivileged/capi-testcases.cpp
src/ckm/unprivileged/main.cpp

index 4491458..d8049f2 100644 (file)
@@ -644,13 +644,13 @@ RUNNER_TEST(T3042_save_get_bin_data_C_API)
                        CKMCReadableError(temp));
 
        RUNNER_ASSERT_MSG(
-                       CKMC_ERROR_INVALID_PARAMETER == (temp = ckmc_save_data("data4", testData3, test_policy3)),
+                       CKMC_ERROR_NONE == (temp = ckmc_save_data("data4", testData3, test_policy3)),
                        CKMCReadableError(temp));
 
        size_t actual_cnt = count_aliases(ALIAS_DATA);
        RUNNER_ASSERT_MSG(
-                       (current_aliases_num+3) == actual_cnt,
-                       "Error: expecting " << (current_aliases_num+3) << " aliases, while found " << actual_cnt);
+                       (current_aliases_num+4) == actual_cnt,
+                       "Error: expecting " << (current_aliases_num+4) << " aliases, while found " << actual_cnt);
 
        ckmc_raw_buffer_s *testData4;
        RUNNER_ASSERT_MSG(
index 5d939ee..883a4fe 100644 (file)
@@ -434,7 +434,7 @@ RUNNER_TEST(T1023_app_user_save_keys_exportable_flag)
         CKM_API_ERROR_NOT_EXPORTABLE == (temp = manager->getKey("appkey4", CKM::Password(), key)),
         "Error=" << CKM::APICodeToString(temp));
     RUNNER_ASSERT_MSG(
-        CKM_API_ERROR_INPUT_PARAM == (temp = manager->saveData("data3", buffer, notExportable)),
+        CKM_API_SUCCESS == (temp = manager->saveData("data3", buffer, notExportable)),
         "Error=" << CKM::APICodeToString(temp));
 }