From d8c7fb0856600ea69d873be34916742a1d2847d6 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Wed, 10 Apr 2024 18:16:38 +0200 Subject: [PATCH] Remove carriage return \r for better debug. Signed-off-by: Pol Henarejos --- src/hsm/cmd_keypair_gen.c | 4 ++-- src/hsm/sc_hsm.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/hsm/cmd_keypair_gen.c b/src/hsm/cmd_keypair_gen.c index 6a88b85..22c1e05 100644 --- a/src/hsm/cmd_keypair_gen.c +++ b/src/hsm/cmd_keypair_gen.c @@ -47,7 +47,7 @@ int cmd_keypair_gen() { if (asn1_find_tag(&ctxo, 0x2, &ks) && asn1_len(&ks) > 0) { key_size = asn1_get_uint(&ks); } - printf("KEYPAIR RSA %lu (%lx)\r\n", + printf("KEYPAIR RSA %lu (%lx)\n", (unsigned long) key_size, (unsigned long) exponent); mbedtls_rsa_context rsa; @@ -75,7 +75,7 @@ int cmd_keypair_gen() { return SW_WRONG_DATA(); } mbedtls_ecp_group_id ec_id = ec_get_curve_from_prime(prime.data, prime.len); - printf("KEYPAIR ECC %d\r\n", ec_id); + printf("KEYPAIR ECC %d\n", ec_id); if (ec_id == MBEDTLS_ECP_DP_NONE) { return SW_FUNC_NOT_SUPPORTED(); } diff --git a/src/hsm/sc_hsm.c b/src/hsm/sc_hsm.c index bd43567..d4ccb68 100644 --- a/src/hsm/sc_hsm.c +++ b/src/hsm/sc_hsm.c @@ -97,24 +97,24 @@ void scan_files() { file_pin1 = search_by_fid(0x1081, NULL, SPECIFY_EF); if (file_pin1) { if (!file_pin1->data) { - printf("PIN1 is empty. Initializing with default password\r\n"); + printf("PIN1 is empty. Initializing with default password\n"); const uint8_t empty[33] = { 0 }; flash_write_data_to_file(file_pin1, empty, sizeof(empty)); } } else { - printf("FATAL ERROR: PIN1 not found in memory!\r\n"); + printf("FATAL ERROR: PIN1 not found in memory!\n"); } file_sopin = search_by_fid(0x1088, NULL, SPECIFY_EF); if (file_sopin) { if (!file_sopin->data) { - printf("SOPIN is empty. Initializing with default password\r\n"); + printf("SOPIN is empty. Initializing with default password\n"); const uint8_t empty[33] = { 0 }; flash_write_data_to_file(file_sopin, empty, sizeof(empty)); } } else { - printf("FATAL ERROR: SOPIN not found in memory!\r\n"); + printf("FATAL ERROR: SOPIN not found in memory!\n"); } file_retries_pin1 = search_by_fid(0x1083, NULL, SPECIFY_EF); if (file_retries_pin1) { @@ -125,18 +125,18 @@ void scan_files() { } } else { - printf("FATAL ERROR: Retries PIN1 not found in memory!\r\n"); + printf("FATAL ERROR: Retries PIN1 not found in memory!\n"); } file_retries_sopin = search_by_fid(0x108A, NULL, SPECIFY_EF); if (file_retries_sopin) { if (!file_retries_sopin->data) { - printf("Retries SOPIN is empty. Initializing with default retries\r\n"); + printf("Retries SOPIN is empty. Initializing with default retries\n"); const uint8_t retries = 15; flash_write_data_to_file(file_retries_sopin, &retries, sizeof(uint8_t)); } } else { - printf("FATAL ERROR: Retries SOPIN not found in memory!\r\n"); + printf("FATAL ERROR: Retries SOPIN not found in memory!\n"); } file_t *tf = NULL; @@ -149,18 +149,18 @@ void scan_files() { } } else { - printf("FATAL ERROR: Max Retries PIN1 not found in memory!\r\n"); + printf("FATAL ERROR: Max Retries PIN1 not found in memory!\n"); } tf = search_by_fid(0x1089, NULL, SPECIFY_EF); if (tf) { if (!tf->data) { - printf("Max Retries SOPIN is empty. Initializing with default max retries\r\n"); + printf("Max Retries SOPIN is empty. Initializing with default max retries\n"); const uint8_t retries = 15; flash_write_data_to_file(tf, &retries, sizeof(uint8_t)); } } else { - printf("FATAL ERROR: Retries SOPIN not found in memory!\r\n"); + printf("FATAL ERROR: Retries SOPIN not found in memory!\n"); } low_flash_available(); }