Skip to content

Commit

Permalink
[#344] Remove commented code, debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbrown6 committed Nov 25, 2024
1 parent 17f066e commit a1810ff
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 35 deletions.
13 changes: 0 additions & 13 deletions src/core/crypto_aos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
// &current_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++)
Expand Down
13 changes: 0 additions & 13 deletions src/core/crypto_tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
// &current_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++)
Expand Down
8 changes: 1 addition & 7 deletions src/sa/mariadb/sa_interface_mariadb.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 0 additions & 2 deletions test/kmc/ut_tm_kmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a1810ff

Please sign in to comment.