Added new file to read in and dump error message and added cleanup within cleanup script

This commit is contained in:
Ethan Looney
2020-07-21 11:59:04 -07:00
parent e8034619ba
commit b500a54fc5
2 changed files with 16 additions and 9 deletions

View File

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

View File

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