From d2fc77ae9343c83ff3e74e90a4f76b870cb9980f Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 11 Mar 2025 17:10:54 -0500 Subject: [PATCH] wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK()s around pkcs7enveloped_test() and pkcs7authenveloped_test() exposed by "--enable-fips=ready --enable-pkcs7 --disable-harden". --- wolfcrypt/test/test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index b12279292..778eeca27 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -2396,16 +2396,20 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ else TEST_PASS("PKCS7signed test passed!\n"); + PRIVATE_KEY_UNLOCK(); if ( (ret = pkcs7enveloped_test()) != 0) TEST_FAIL("PKCS7enveloped test failed!\n", ret); else TEST_PASS("PKCS7enveloped test passed!\n"); + PRIVATE_KEY_LOCK(); #if defined(HAVE_AESGCM) || defined(HAVE_AESCCM) + PRIVATE_KEY_UNLOCK(); if ( (ret = pkcs7authenveloped_test()) != 0) TEST_FAIL("PKCS7authenveloped test failed!\n", ret); else TEST_PASS("PKCS7authenveloped test passed!\n"); + PRIVATE_KEY_LOCK(); #endif #endif