mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Merge pull request #381 from kaleb-himes/scan-build-psk
scan-build warnings related to enable-psk, disable-asn,rsa,ecc
This commit is contained in:
@@ -917,11 +917,15 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WOLFSSL_LEANPSK
|
#ifdef WOLFSSL_LEANPSK
|
||||||
usePsk = 1;
|
if (!usePsk) {
|
||||||
|
usePsk = 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NO_RSA) && !defined(HAVE_ECC)
|
#if defined(NO_RSA) && !defined(HAVE_ECC)
|
||||||
usePsk = 1;
|
if (!usePsk) {
|
||||||
|
usePsk = 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fewerPackets)
|
if (fewerPackets)
|
||||||
@@ -948,7 +952,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
err_sys("client can't set cipher list 2");
|
err_sys("client can't set cipher list 2");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
useClientCert = 0;
|
if (useClientCert) {
|
||||||
|
useClientCert = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useAnon) {
|
if (useAnon) {
|
||||||
@@ -959,7 +965,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
err_sys("client can't set cipher list 4");
|
err_sys("client can't set cipher list 4");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
useClientCert = 0;
|
if (useClientCert) {
|
||||||
|
useClientCert = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
||||||
@@ -1436,6 +1444,15 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
ShowMemoryTracker();
|
ShowMemoryTracker();
|
||||||
#endif /* USE_WOLFSSL_MEMORY */
|
#endif /* USE_WOLFSSL_MEMORY */
|
||||||
|
|
||||||
|
/* There are use cases when these assignments are not read. To avoid
|
||||||
|
* potential confusion those warnings have been handled here.
|
||||||
|
*/
|
||||||
|
(void) overrideDateErrors;
|
||||||
|
(void) useClientCert;
|
||||||
|
(void) verifyCert;
|
||||||
|
(void) ourCert;
|
||||||
|
(void) ourKey;
|
||||||
|
|
||||||
#if !defined(WOLFSSL_TIRTOS)
|
#if !defined(WOLFSSL_TIRTOS)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -614,11 +614,15 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
|||||||
err_sys("server can't set cipher list 1");
|
err_sys("server can't set cipher list 1");
|
||||||
|
|
||||||
#ifdef CYASSL_LEANPSK
|
#ifdef CYASSL_LEANPSK
|
||||||
usePsk = 1;
|
if (!usePsk) {
|
||||||
|
usePsk = 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NO_RSA) && !defined(HAVE_ECC)
|
#if defined(NO_RSA) && !defined(HAVE_ECC)
|
||||||
usePsk = 1;
|
if (!usePsk) {
|
||||||
|
usePsk = 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fewerPackets)
|
if (fewerPackets)
|
||||||
@@ -971,6 +975,15 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
|||||||
TicketCleanup();
|
TicketCleanup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* There are use cases when these assignments are not read. To avoid
|
||||||
|
* potential confusion those warnings have been handled here.
|
||||||
|
*/
|
||||||
|
(void) ourKey;
|
||||||
|
(void) verifyCert;
|
||||||
|
(void) doCliCertCheck;
|
||||||
|
(void) useNtruKey;
|
||||||
|
(void) ourDhParam;
|
||||||
|
(void) ourCert;
|
||||||
#ifndef CYASSL_TIRTOS
|
#ifndef CYASSL_TIRTOS
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -8549,6 +8549,10 @@ static int BuildMessage(WOLFSSL* ssl, byte* output, int outSz,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
int atomicUser = 0;
|
int atomicUser = 0;
|
||||||
|
|
||||||
|
if (ssl == NULL || output == NULL || input == NULL) {
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WOLFSSL_DTLS
|
#ifdef WOLFSSL_DTLS
|
||||||
if (ssl->options.dtls) {
|
if (ssl->options.dtls) {
|
||||||
sz += DTLS_RECORD_EXTRA;
|
sz += DTLS_RECORD_EXTRA;
|
||||||
|
Reference in New Issue
Block a user