diff --git a/configure.ac b/configure.ac index e27329888..e307cbf45 100644 --- a/configure.ac +++ b/configure.ac @@ -3160,7 +3160,7 @@ then fi fi -if test "$ENABLED_NGINX" = "yes"|| test "x$ENABLED_HAPROXY" = "xyes" +if test "$ENABLED_NGINX" = "yes"|| test "x$ENABLED_HAPROXY" = "xyes" || test "x$ENABLED_LIGHTY" = "xyes" then AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_VERIFY_CB" AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALWAYS_KEEP_SNI" diff --git a/tests/api.c b/tests/api.c index c48a6dd23..a18b3ea7e 100644 --- a/tests/api.c +++ b/tests/api.c @@ -18391,6 +18391,11 @@ static void test_wolfSSL_ERR_put_error(void) /* Empty and free up all error nodes */ ERR_clear_error(); + /* Verify all nodes are cleared */ + ERR_put_error(0,SYS_F_ACCEPT, 0, "this file", 0); + ERR_clear_error(); + AssertIntEQ(ERR_get_error_line(&file, &line), 0); + printf(resultFmt, passed); #endif } diff --git a/wolfcrypt/src/logging.c b/wolfcrypt/src/logging.c index ecc64c460..03d199866 100644 --- a/wolfcrypt/src/logging.c +++ b/wolfcrypt/src/logging.c @@ -677,8 +677,9 @@ void wc_ClearErrorNodes(void) } } - wc_errors = NULL; - wc_last_node = NULL; + wc_errors = NULL; + wc_last_node = NULL; + wc_current_node = NULL; wc_UnLockMutex(&debug_mutex); #endif /* DEBUG_WOLFSSL || WOLFSSL_NGINX */ }