From: Krzysztof Jackiewicz Date: Mon, 28 Apr 2025 13:26:09 +0000 (+0200) Subject: [UTC][key-manager][Non-ACR]Remove unnecessary failing code X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F323454%2F1;p=test%2Ftct%2Fnative%2Fapi.git [UTC][key-manager][Non-ACR]Remove unnecessary failing code Change-Id: I6e179f866cc806da9a76b27efae68b390ab311ce --- diff --git a/src/utc/key-manager/utc-key-manager-type.c b/src/utc/key-manager/utc-key-manager-type.c index 63ca2fd01..ce4fb457a 100755 --- a/src/utc/key-manager/utc-key-manager-type.c +++ b/src/utc/key-manager/utc-key-manager-type.c @@ -156,30 +156,6 @@ static const char *TEST_LEAF_CERT = "-----END CERTIFICATE-----"; -static char *file1 = "ckm_test_cert"; -static char *file2 = "ckm_test_cert_2"; -static char *path1 = NULL; -static char *path2 = NULL; - - -static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) -{ - if(type == STORAGE_TYPE_INTERNAL) - { - size_t length = strlen(path) + strlen(file1) + 2; - path1 = (char*)malloc(length); - memset(path1, 0x00, length); - snprintf(path1, length, "%s/%s", path, file1); - length = strlen(path) + strlen(file2) + 2; - path2 = (char*)malloc(length); - memset(path2, 0x00, length); - snprintf(path2, length, "%s/%s", path, file2); - return false; - } - return true; -} - - /** * @function utc_key_manager_type_startup * @description Called before each test @@ -188,10 +164,6 @@ static bool __storage_device_supported_cb(int storage_id, storage_type_e type, s */ void utc_key_manager_type_startup(void) { - if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) - { - fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); - } } /** @@ -202,8 +174,6 @@ void utc_key_manager_type_startup(void) */ void utc_key_manager_type_cleanup(void) { - if(path1) free(path1); - if(path2) free(path2); } /** @@ -1327,7 +1297,6 @@ int utc_ckmc_load_cert_from_file_p(void) assert_eq(ret,CKMC_ERROR_NONE); ckmc_cert_free(pcert); - remove(path1); return 0; } @@ -1350,8 +1319,6 @@ int utc_ckmc_load_cert_from_file_n(void) ret = ckmc_load_cert_from_file(cert_path, &pcert); assert_eq(ret,CKMC_ERROR_INVALID_FORMAT); - remove(path2); - return 0; } @@ -1413,9 +1380,6 @@ int utc_ckmc_load_from_pkcs12_file_p(void) ckmc_cert_free(cert); ckmc_cert_list_all_free(ca_cert_list); - remove(path1); - remove(path2); - return 0; }