diff --git a/tests/api.c b/tests/api.c index 4a953cd85..c0ddfb9dd 100644 --- a/tests/api.c +++ b/tests/api.c @@ -15589,6 +15589,9 @@ static void test_wolfSSL_ERR_put_error(void) AssertIntEQ(ERR_get_error_line(&file, &line), 0); AssertNull(file); + /* Empty and free up all error nodes */ + ERR_clear_error(); + printf(resultFmt, passed); #endif } diff --git a/wolfcrypt/src/logging.c b/wolfcrypt/src/logging.c index c2fcec7c4..c175754a6 100644 --- a/wolfcrypt/src/logging.c +++ b/wolfcrypt/src/logging.c @@ -266,6 +266,11 @@ void WOLFSSL_ERROR(int error) * to unlock mutex and log what buffer was created. */ } #if defined(OPENSSL_EXTRA) && !defined(WOLFCRYPT_ONLY) + } + else { + XSNPRINTF(buffer, sizeof(buffer), + "wolfSSL error occurred, error = %d", error); + } #endif