From a1810ff4939e7edfa0c7f5af35cea783319783b2 Mon Sep 17 00:00:00 2001 From: Robert Brown Date: Mon, 25 Nov 2024 12:49:48 -0500 Subject: [PATCH] [nasa/cryptolib#344] Remove commented code, debug prints --- src/core/crypto_aos.c | 13 ------------- src/core/crypto_tm.c | 13 ------------- src/sa/mariadb/sa_interface_mariadb.template.c | 8 +------- test/kmc/ut_tm_kmc.c | 2 -- 4 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/core/crypto_aos.c b/src/core/crypto_aos.c index 47d06225..26247d31 100644 --- a/src/core/crypto_aos.c +++ b/src/core/crypto_aos.c @@ -118,19 +118,6 @@ int32_t Crypto_AOS_ApplySecurity(uint8_t *pTfBuffer) return status; } -// status = Crypto_Get_Managed_Parameters_For_Gvcid(tfvn, scid, vcid, gvcid_managed_parameters_array, -// ¤t_managed_parameters_struct); - -// // No managed parameters found -// if (status != CRYPTO_LIB_SUCCESS) -// { -// #ifdef AOS_DEBUG -// printf(KRED "Error: No managed parameters found!\n" RESET); -// #endif -// mc_if->mc_log(status); -// return status; -// } - #ifdef AOS_DEBUG printf(KYEL "AOS BEFORE Apply Sec:\n\t" RESET); for (int16_t i = 0; i < current_managed_parameters_struct.max_frame_size; i++) diff --git a/src/core/crypto_tm.c b/src/core/crypto_tm.c index 0329ac38..1d9fe64e 100644 --- a/src/core/crypto_tm.c +++ b/src/core/crypto_tm.c @@ -738,19 +738,6 @@ int32_t Crypto_TM_ApplySecurity(uint8_t *pTfBuffer) return status; } -// status = Crypto_Get_Managed_Parameters_For_Gvcid(tfvn, scid, vcid, gvcid_managed_parameters_array, -// ¤t_managed_parameters_struct); - -// // No managed parameters found -// if (status != CRYPTO_LIB_SUCCESS) -// { -// #ifdef TM_DEBUG -// printf(KRED "Error: No managed parameters found!\n" RESET); -// #endif -// mc_if->mc_log(status); -// return status; -// } - #ifdef TM_DEBUG printf(KYEL "TM BEFORE Apply Sec:\n\t" RESET); for (int16_t i = 0; i < current_managed_parameters_struct.max_frame_size; i++) diff --git a/src/sa/mariadb/sa_interface_mariadb.template.c b/src/sa/mariadb/sa_interface_mariadb.template.c index 794bd9ed..451224bd 100644 --- a/src/sa/mariadb/sa_interface_mariadb.template.c +++ b/src/sa/mariadb/sa_interface_mariadb.template.c @@ -606,26 +606,20 @@ static int32_t parse_table_from_gvcid(char* table) int32_t status = CRYPTO_LIB_SUCCESS; if (current_managed_parameters_struct.has_fecf == TC_HAS_FECF || current_managed_parameters_struct.has_fecf == TC_NO_FECF) { - //table = MARIADB_TC_TABLE_NAME; strcpy(table, MARIADB_TC_TABLE_NAME); } else if (current_managed_parameters_struct.has_fecf == TM_HAS_FECF || current_managed_parameters_struct.has_fecf == TM_NO_FECF) { - //table = MARIADB_TM_TABLE_NAME; strcpy(table, MARIADB_TM_TABLE_NAME); } else if (current_managed_parameters_struct.has_fecf == AOS_HAS_FECF || current_managed_parameters_struct.has_fecf == AOS_NO_FECF) { - //table = MARIADB_AOS_TABLE_NAME; strcpy(table, MARIADB_AOS_TABLE_NAME); } else { table = table; status = CRYPTO_LIB_ERROR; - } -#ifdef DEBUG - printf("Current_man_params.has_fecf: %d\n", current_managed_parameters_struct.has_fecf); -#endif + } return status; } \ No newline at end of file diff --git a/test/kmc/ut_tm_kmc.c b/test/kmc/ut_tm_kmc.c index 6bffb552..5e0461e0 100644 --- a/test/kmc/ut_tm_kmc.c +++ b/test/kmc/ut_tm_kmc.c @@ -217,8 +217,6 @@ UTEST(TM_APPLY_KMC, HAPPY_PATH_ENC_TM_CBC_KMC) return_val = Crypto_TM_ApplySecurity((uint8_t *)raw_tm_sdls_ping_b); - printf("has_fecf: %d\n", current_managed_parameters_struct.has_fecf); - Crypto_Shutdown(); free(raw_tm_sdls_ping_b); ASSERT_EQ(CRYPTO_LIB_SUCCESS, return_val);