wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.36k stars 835 forks source link

20241016-dtls13-cleanup #8088

Closed douzzer closed 1 month ago

douzzer commented 1 month ago

analyzer-driven cleanups of --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch:

Dtls13HashClientHello(): fix wc_HashType handling;

Dtls13SendFragment(): fix identicalConditionAfterEarlyExit;

GetDtlsRecordHeader(): fix error handling around GetDtls13RecordHeader() (incorrectLogicOperator);

test_wolfSSL_dtls_stateless_maxfrag(): fix a clang-analyzer-core.NullDereference, test_dtls_frag_ch(): fix a clang-diagnostic-embedded-directive, test_AEAD_limit_client(): fix an united-data defect found by valgrind.

tested with wolfssl-multi-test.sh ... super-quick-check with ENABLE_ALL_TEST_FLAGS tweaked to add --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch.

douzzer commented 1 month ago

retest this please