mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Added new file to read in and dump error message and added cleanup within cleanup script
This commit is contained in:
@@ -12,3 +12,4 @@ rm -f ./certeccrsa.der
|
|||||||
rm -f ./ecc-key.der
|
rm -f ./ecc-key.der
|
||||||
rm -f ./ecc-key.pem
|
rm -f ./ecc-key.pem
|
||||||
rm -f ./ecc-public-key.der
|
rm -f ./ecc-public-key.der
|
||||||
|
rm -f ./test-log-dump-to-file.txt
|
||||||
|
18
tests/api.c
18
tests/api.c
@@ -27169,16 +27169,16 @@ static int test_WOLFSSL_ERROR_MSG (void)
|
|||||||
static int test_wc_ERR_remove_state (void)
|
static int test_wc_ERR_remove_state (void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
#if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
|
#if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
|
||||||
|
|
||||||
printf(testingFmt, "wc_ERR_remove_state()");
|
printf(testingFmt, "wc_ERR_remove_state()");
|
||||||
|
|
||||||
ret = wc_ERR_remove_state();
|
wc_ERR_remove_state();
|
||||||
|
|
||||||
printf(resultFmt, ret == 0 ? passed : failed);
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}/*End test_wc_ERR_remove_state*/
|
}/*End test_wc_ERR_remove_state*/
|
||||||
@@ -27190,16 +27190,22 @@ static int test_wc_ERR_print_errors_fp (void)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
#if (defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)) && \
|
#if (defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)) && \
|
||||||
(!defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM))
|
(!defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM))
|
||||||
|
int sz;
|
||||||
printf(testingFmt, "wc_ERR_print_errors_fp()");
|
printf(testingFmt, "wc_ERR_print_errors_fp()");
|
||||||
|
WOLFSSL_ERROR(BAD_FUNC_ARG);
|
||||||
XFILE fp = XFOPEN("./certs/dsa2048.der", "rb");
|
//XFILE fp = XFOPEN("./certs/ecc-keyPkcs8.pem", "rb");
|
||||||
|
XFILE fp = XFOPEN("./test-log-dump-to-file.txt", "ar");
|
||||||
wc_ERR_print_errors_fp(fp);
|
wc_ERR_print_errors_fp(fp);
|
||||||
|
|
||||||
|
AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0);
|
||||||
|
sz = XFTELL(fp);
|
||||||
|
if (sz == 0) {
|
||||||
|
ret = BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
printf(resultFmt, ret == 0 ? passed : failed);
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
XFCLOSE(fp);
|
XFCLOSE(fp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}/*End test_wc_ERR_print_errors_fp*/
|
}/*End test_wc_ERR_print_errors_fp*/
|
||||||
|
Reference in New Issue
Block a user