mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Merge pull request #5096 from JacobBarthelmeh/Testing
- static analysis test fixes
This commit is contained in:
@ -12737,7 +12737,7 @@ WOLFSSL_ABI
|
||||
int wolfSSL_CTX_set_timeout(WOLFSSL_CTX* ctx, unsigned int to)
|
||||
{
|
||||
#if defined(WOLFSSL_ERROR_CODE_OPENSSL)
|
||||
word32 prev_timeout;
|
||||
word32 prev_timeout = 0;
|
||||
#endif
|
||||
|
||||
int ret = WOLFSSL_SUCCESS;
|
||||
|
10
tests/api.c
10
tests/api.c
@ -950,10 +950,12 @@ static void test_wolfSSL_CTX_trust_peer_cert(void)
|
||||
AssertIntEQ(wolfSSL_trust_peer_cert(ssl, cliCertFile,
|
||||
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
|
||||
|
||||
#ifdef WOLFSSL_LOCAL_X509_STORE
|
||||
/* unload cert */
|
||||
AssertIntNE(wolfSSL_Unload_trust_peers(NULL), WOLFSSL_SUCCESS);
|
||||
AssertIntEQ(wolfSSL_Unload_trust_peers(ssl), WOLFSSL_SUCCESS);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Test of loading certs from buffers */
|
||||
|
||||
@ -34252,9 +34254,11 @@ static void test_wolfSSL_Tls13_Key_Logging_test(void)
|
||||
#endif
|
||||
|
||||
/* check if the keylog file exists */
|
||||
|
||||
{
|
||||
char buff[300] = {0};
|
||||
int found[4] = {0};
|
||||
int numfnd = 0;
|
||||
int i;
|
||||
|
||||
fp = XFOPEN("./MyKeyLog.txt", "r");
|
||||
|
||||
@ -34283,12 +34287,12 @@ static void test_wolfSSL_Tls13_Key_Logging_test(void)
|
||||
}
|
||||
}
|
||||
XFCLOSE(fp);
|
||||
int numfnd = 0;
|
||||
for( uint i = 0; i < 4; i++) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if( found[i] != 0)
|
||||
numfnd++;
|
||||
}
|
||||
AssertIntEQ(numfnd, 4);
|
||||
}
|
||||
|
||||
printf(resultFmt, passed);
|
||||
|
||||
|
Reference in New Issue
Block a user