Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240719-test-hpke-PRIVATE_KEY_UNLOCK #7772

Merged
merged 2 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right place to put the unlock? Why not on the specific key use in HPKE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's the code pattern for all the other tests that need it -- just following the pattern.

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)
Expand Down
6 changes: 6 additions & 0 deletions wolfssl/wolfcrypt/error-crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <wolfssl/debug-trace-error-codes.h>
#else
Expand Down
Loading