Fixed issue reported by scan-build when DTLS13 is enabled. Fix compile issue when WOLFSSL_DTLS_CH_FRAG is enabled. Fix running of scripts/dtlscid.test by removing 'set -e' as bwrap command may not be there.
@@ -1,6 +1,7 @@
#!/bin/bash
-set -e
+# dtlscid.test
+# Copyright wolfSSL 2022-2024
# if we can, isolate the network namespace to eliminate port collisions.
if [[ -n "$NETWORK_UNSHARE_HELPER" ]]; then
@@ -6120,8 +6120,12 @@ static int TLSX_SupportedVersions_Write(void* data, byte* output,
#ifdef WOLFSSL_DTLS13
if (ssl->options.dtls) {
tls13minor = (byte)DTLSv1_3_MINOR;
+ #ifndef WOLFSSL_NO_TLS12
tls12minor = (byte)DTLSv1_2_MINOR;
+ #endif
+ #ifndef NO_OLD_TLS
tls11minor = (byte)DTLS_MINOR;
isDtls = 1;
}
#endif /* WOLFSSL_DTLS13 */
@@ -4443,7 +4443,7 @@ int SendTls13ClientHello(WOLFSSL* ssl)
{
#ifdef WOLFSSL_DTLS_CH_FRAG
- int maxFrag = wolfSSL_GetMaxFragSize(ssl, MAX_RECORD_SIZE);
+ word16 maxFrag = wolfSSL_GetMaxFragSize(ssl, MAX_RECORD_SIZE);
word16 lenWithoutExts = args->length;
#endif