From 6952d1a5ea9d0436268538b6e376ec652a77c8ea Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 19 Jul 2024 18:30:31 -0500 Subject: [PATCH 1/2] wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition for WC_ERR_TRACE(). --- wolfssl/wolfcrypt/error-crypt.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 6b2f31f5ba..8fb71b3c6a 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -300,10 +300,16 @@ WOLFSSL_ABI WOLFSSL_API const char* wc_GetErrorString(int error); #ifdef WOLFSSL_DEBUG_TRACE_ERROR_CODES #define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label) #ifndef WC_ERR_TRACE + #ifdef NO_STDIO_FILESYSTEM + #define WC_ERR_TRACE(label) \ + ( printf("ERR TRACE: %s L %d " #label " (%d)\n", \ + __FILE__, __LINE__, label), label) + #else #define WC_ERR_TRACE(label) \ ( fprintf(stderr, \ "ERR TRACE: %s L %d " #label " (%d)\n", \ __FILE__, __LINE__, label), label) + #endif #endif #include #else From 765231060e50d502b508f813224c0f37e3a16e82 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 19 Jul 2024 18:31:01 -0500 Subject: [PATCH 2/2] wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK() for hpke_test(). --- wolfcrypt/test/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 5189cefd83..605689905a 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -1767,10 +1767,12 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ #endif #if defined(HAVE_HPKE) && defined(HAVE_ECC) && defined(HAVE_AESGCM) + PRIVATE_KEY_UNLOCK(); if ( (ret = hpke_test()) != 0) TEST_FAIL("HPKE test failed!\n", ret); else TEST_PASS("HPKE test passed!\n"); + PRIVATE_KEY_LOCK(); #endif #if defined(WC_SRTP_KDF)