Skip to content

Commit a9ff773

Browse files
authored
Merge pull request #7772 from douzzer/20240719-test-hpke-PRIVATE_KEY_UNLOCK
20240719-test-hpke-PRIVATE_KEY_UNLOCK
2 parents 33f71f6 + 7652310 commit a9ff773

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

wolfcrypt/test/test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,10 +1767,12 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
17671767
#endif
17681768

17691769
#if defined(HAVE_HPKE) && defined(HAVE_ECC) && defined(HAVE_AESGCM)
1770+
PRIVATE_KEY_UNLOCK();
17701771
if ( (ret = hpke_test()) != 0)
17711772
TEST_FAIL("HPKE test failed!\n", ret);
17721773
else
17731774
TEST_PASS("HPKE test passed!\n");
1775+
PRIVATE_KEY_LOCK();
17741776
#endif
17751777

17761778
#if defined(WC_SRTP_KDF)

wolfssl/wolfcrypt/error-crypt.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,16 @@ WOLFSSL_ABI WOLFSSL_API const char* wc_GetErrorString(int error);
300300
#ifdef WOLFSSL_DEBUG_TRACE_ERROR_CODES
301301
#define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label)
302302
#ifndef WC_ERR_TRACE
303+
#ifdef NO_STDIO_FILESYSTEM
304+
#define WC_ERR_TRACE(label) \
305+
( printf("ERR TRACE: %s L %d " #label " (%d)\n", \
306+
__FILE__, __LINE__, label), label)
307+
#else
303308
#define WC_ERR_TRACE(label) \
304309
( fprintf(stderr, \
305310
"ERR TRACE: %s L %d " #label " (%d)\n", \
306311
__FILE__, __LINE__, label), label)
312+
#endif
307313
#endif
308314
#include <wolfssl/debug-trace-error-codes.h>
309315
#else

0 commit comments

Comments
 (0)