Merge pull request #1372 from JacobBarthelmeh/UnitTests

clear error node queue after test case and initialize logging buffer
This commit is contained in:
John Safranek 2018-02-15 08:40:45 -08:00 committed by GitHub
commit d8eff923f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -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
}

View File

@ -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