Skip to content

Commit d2fc77a

Browse files
committed
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".
1 parent 9a84dfc commit d2fc77a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

wolfcrypt/test/test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,16 +2396,20 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
23962396
else
23972397
TEST_PASS("PKCS7signed test passed!\n");
23982398

2399+
PRIVATE_KEY_UNLOCK();
23992400
if ( (ret = pkcs7enveloped_test()) != 0)
24002401
TEST_FAIL("PKCS7enveloped test failed!\n", ret);
24012402
else
24022403
TEST_PASS("PKCS7enveloped test passed!\n");
2404+
PRIVATE_KEY_LOCK();
24032405

24042406
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
2407+
PRIVATE_KEY_UNLOCK();
24052408
if ( (ret = pkcs7authenveloped_test()) != 0)
24062409
TEST_FAIL("PKCS7authenveloped test failed!\n", ret);
24072410
else
24082411
TEST_PASS("PKCS7authenveloped test passed!\n");
2412+
PRIVATE_KEY_LOCK();
24092413
#endif
24102414
#endif
24112415

0 commit comments

Comments
 (0)