diff --git a/core/embed/trezorhal/optiga/optiga_commands.c b/core/embed/trezorhal/optiga/optiga_commands.c index 4c8de2ac4..3884dd6a7 100644 --- a/core/embed/trezorhal/optiga/optiga_commands.c +++ b/core/embed/trezorhal/optiga/optiga_commands.c @@ -50,11 +50,11 @@ const optiga_metadata_item OPTIGA_META_KEY_USE_KEYAGREE = const optiga_metadata_item OPTIGA_META_VERSION_DEFAULT = { (const uint8_t[]){0x00, 0x00}, 2}; -#ifdef NDEBUG +#if PRODUCTION #define OPTIGA_LOG(prefix, data, data_size) #else static optiga_log_hex_t log_hex = NULL; -void optiga_set_command_log_hex(optiga_log_hex_t f) { log_hex = f; } +void optiga_command_set_log_hex(optiga_log_hex_t f) { log_hex = f; } #define OPTIGA_LOG(prefix, data, data_size) \ if (log_hex != NULL) { \ log_hex(prefix, data, data_size); \ diff --git a/core/embed/trezorhal/optiga/optiga_transport.c b/core/embed/trezorhal/optiga/optiga_transport.c index 6726c6d99..362d6821d 100644 --- a/core/embed/trezorhal/optiga/optiga_transport.c +++ b/core/embed/trezorhal/optiga/optiga_transport.c @@ -134,7 +134,7 @@ static uint8_t sec_chan_buffer[OPTIGA_MAX_APDU_SIZE + SEC_CHAN_OVERHEAD_SIZE] = {0}; static size_t sec_chan_size = 0; -#ifdef NDEBUG +#if PRODUCTION #define OPTIGA_LOG(prefix, data, data_size) #else static optiga_log_hex_t log_hex = NULL; diff --git a/core/embed/trezorhal/optiga_commands.h b/core/embed/trezorhal/optiga_commands.h index 89952256b..57a5bb174 100644 --- a/core/embed/trezorhal/optiga_commands.h +++ b/core/embed/trezorhal/optiga_commands.h @@ -207,8 +207,8 @@ optiga_result optiga_derive_key(optiga_key_derivation deriv, uint16_t oid, optiga_result optiga_set_trust_anchor(void); optiga_result optiga_set_priv_key(uint16_t oid, const uint8_t priv_key[32]); -#ifndef NDEBUG -void optiga_set_command_log_hex(optiga_log_hex_t f); +#if !PRODUCTION +void optiga_command_set_log_hex(optiga_log_hex_t f); #endif #endif diff --git a/core/embed/trezorhal/optiga_common.h b/core/embed/trezorhal/optiga_common.h index b8d4e1578..d86c1ea40 100644 --- a/core/embed/trezorhal/optiga_common.h +++ b/core/embed/trezorhal/optiga_common.h @@ -34,7 +34,7 @@ typedef enum _optiga_result { OPTIGA_ERR_CMD, // Command error. See error code data object 0xF1C2. } optiga_result; -#ifndef NDEBUG +#if !PRODUCTION typedef void (*optiga_log_hex_t)(const char *prefix, const uint8_t *data, size_t data_size); #endif diff --git a/core/embed/trezorhal/optiga_transport.h b/core/embed/trezorhal/optiga_transport.h index 3df49dec9..fd34dd8d9 100644 --- a/core/embed/trezorhal/optiga_transport.h +++ b/core/embed/trezorhal/optiga_transport.h @@ -44,7 +44,7 @@ optiga_result optiga_resync(void); optiga_result optiga_soft_reset(void); optiga_result optiga_set_data_reg_len(size_t size); -#ifndef NDEBUG +#if !PRODUCTION void optiga_set_transport_log_hex(optiga_log_hex_t f); #endif