mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
Add more if defined to ERR_print_errors_fp
This commit is contained in:
76
tests/api.c
76
tests/api.c
@ -27143,7 +27143,79 @@ static void test_wolfSSL_ERR_print_errors_cb(void)
|
|||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Testing WOLFSSL_ERROR_MSG
|
||||||
|
*/
|
||||||
|
static int test_WOLFSSL_ERROR_MSG (void)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
#if defined(DEBUG_WOLFSSL) || defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) ||\
|
||||||
|
defined(WOLFSSL_HAPROXY) || defined(OPENSSL_EXTRA)
|
||||||
|
const char* msg = "Everyone gets Friday off.";
|
||||||
|
|
||||||
|
printf(testingFmt, "WOLFSSL_ERROR_MSG()");
|
||||||
|
|
||||||
|
WOLFSSL_ERROR_MSG(msg);
|
||||||
|
|
||||||
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}/*End test_WOLFSSL_ERROR_MSG*/
|
||||||
|
/*
|
||||||
|
* Testing wc_ERR_remove_state
|
||||||
|
*/
|
||||||
|
static int test_wc_ERR_remove_state (void)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
#if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
|
||||||
|
|
||||||
|
printf(testingFmt, "wc_ERR_remove_state()");
|
||||||
|
|
||||||
|
ret = wc_ERR_remove_state();
|
||||||
|
|
||||||
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}/*End test_wc_ERR_remove_state*/
|
||||||
|
/*
|
||||||
|
* Testing wc_ERR_print_errors_fp
|
||||||
|
*/
|
||||||
|
static int test_wc_ERR_print_errors_fp (void)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
#if (defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)) && \
|
||||||
|
(!defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM))
|
||||||
|
|
||||||
|
printf(testingFmt, "wc_ERR_print_errors_fp()");
|
||||||
|
|
||||||
|
XFILE fp = XFOPEN("./certs/dsa2048.der", "rb");
|
||||||
|
wc_ERR_print_errors_fp(fp);
|
||||||
|
|
||||||
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
|
XFCLOSE(fp);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}/*End test_wc_ERR_print_errors_fp*/
|
||||||
|
/*
|
||||||
|
* Testing wolfSSL_GetLoggingCb
|
||||||
|
*/
|
||||||
|
static int test_wolfSSL_GetLoggingCb (void)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
printf(testingFmt, "wolfSSL_GetLoggingCb()");
|
||||||
|
|
||||||
|
wolfSSL_GetLoggingCb();
|
||||||
|
|
||||||
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
|
return ret;
|
||||||
|
}/*End test_wolfSSL_GetLoggingCb*/
|
||||||
static void test_wolfSSL_HMAC(void)
|
static void test_wolfSSL_HMAC(void)
|
||||||
{
|
{
|
||||||
#if defined(OPENSSL_EXTRA) && !defined(NO_SHA256)
|
#if defined(OPENSSL_EXTRA) && !defined(NO_SHA256)
|
||||||
@ -34923,6 +34995,10 @@ void ApiTest(void)
|
|||||||
test_wolfSSL_ERR_peek_last_error_line();
|
test_wolfSSL_ERR_peek_last_error_line();
|
||||||
#endif
|
#endif
|
||||||
test_wolfSSL_ERR_print_errors_cb();
|
test_wolfSSL_ERR_print_errors_cb();
|
||||||
|
AssertFalse(test_wolfSSL_GetLoggingCb());
|
||||||
|
AssertFalse(test_WOLFSSL_ERROR_MSG());
|
||||||
|
AssertFalse(test_wc_ERR_remove_state());
|
||||||
|
AssertFalse(test_wc_ERR_print_errors_fp());
|
||||||
test_wolfSSL_set_options();
|
test_wolfSSL_set_options();
|
||||||
test_wolfSSL_sk_SSL_CIPHER();
|
test_wolfSSL_sk_SSL_CIPHER();
|
||||||
test_wolfSSL_X509_STORE_CTX();
|
test_wolfSSL_X509_STORE_CTX();
|
||||||
|
Reference in New Issue
Block a user