From c9e74a4539feea5a045bba482412137a0debf6f3 Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Thu, 23 Feb 2023 10:07:34 +0100 Subject: [PATCH] CKM: Saving unexportable data is now allowed Change-Id: Idfc450ee67d26a0389c62076b8401339c6404362 --- src/ckm/unprivileged/capi-testcases.cpp | 6 +++--- src/ckm/unprivileged/main.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ckm/unprivileged/capi-testcases.cpp b/src/ckm/unprivileged/capi-testcases.cpp index 4491458..d8049f2 100644 --- a/src/ckm/unprivileged/capi-testcases.cpp +++ b/src/ckm/unprivileged/capi-testcases.cpp @@ -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( diff --git a/src/ckm/unprivileged/main.cpp b/src/ckm/unprivileged/main.cpp index 5d939ee..883a4fe 100644 --- a/src/ckm/unprivileged/main.cpp +++ b/src/ckm/unprivileged/main.cpp @@ -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)); } -- 2.7.4