diff --git a/Makefile b/Makefile index 675a1d9..df9129c 100644 --- a/Makefile +++ b/Makefile @@ -35,10 +35,13 @@ APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" ifeq ($(TARGET_NAME),TARGET_NANOS) DEFINES += MAX_INPUT_COUNT=15 + DEFINES += MAX_MESSAGE_LEN=120 else ifeq ($(TARGET_NAME),TARGET_STAX) DEFINES += MAX_INPUT_COUNT=128 + DEFINES += MAX_MESSAGE_LEN=200 else DEFINES += MAX_INPUT_COUNT=128 + DEFINES += MAX_MESSAGE_LEN=200 endif # Application source files @@ -76,7 +79,7 @@ VARIANT_PARAM = COIN VARIANT_VALUES = KAS # Enabling DEBUG flag will enable PRINTF and disable optimizations -#DEBUG = 1 +DEBUG = 1 ######################################## # Application custom permissions # diff --git a/fuzzing/CMakeLists.txt b/fuzzing/CMakeLists.txt index f70f1b9..53891ae 100644 --- a/fuzzing/CMakeLists.txt +++ b/fuzzing/CMakeLists.txt @@ -22,7 +22,7 @@ endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -add_compile_definitions(MAX_INPUT_COUNT=15 USB_SEGMENT_SIZE=64) +add_compile_definitions(MAX_INPUT_COUNT=15 MAX_MESSAGE_LEN=200 USB_SEGMENT_SIZE=64) include(extra/TxParser.cmake) diff --git a/src/constants.h b/src/constants.h index 193a013..151d691 100644 --- a/src/constants.h +++ b/src/constants.h @@ -43,11 +43,6 @@ */ #define MAX_APPNAME_LEN 64 -/** - * Maximum message length (bytes) - */ -#define MAX_MESSAGE_LEN 200 - /** * Maximum signature length (bytes). * Schnorr signatures only have 64 bytes diff --git a/unit-tests/CMakeLists.txt b/unit-tests/CMakeLists.txt index e55f8b4..0842ec4 100644 --- a/unit-tests/CMakeLists.txt +++ b/unit-tests/CMakeLists.txt @@ -33,7 +33,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt. ") endif() -add_compile_definitions(TEST HAVE_HASH HAVE_BLAKE2 HAVE_ECC USB_SEGMENT_SIZE=64 MAX_INPUT_COUNT=15 IO_SEPROXYHAL_BUFFER_SIZE_B=128) +add_compile_definitions(TEST HAVE_HASH HAVE_BLAKE2 HAVE_ECC USB_SEGMENT_SIZE=64 MAX_INPUT_COUNT=15 MAX_MESSAGE_LEN=200 IO_SEPROXYHAL_BUFFER_SIZE_B=128) include_directories(../src) # include_directories(mock_includes)