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 834 forks source link

20241113-WC_THREADSHARED #8184

Closed douzzer closed 1 week ago

douzzer commented 1 week ago

rename WOLFSSL_GLOBAL to WC_THREADSHARED, and refactor mutex handling in src/sniffer.c for consistency and correctness, also adding gating on !SINGLE_THREADED for efficiency;

add wc_static_assert in wolfcrypt/test/test.h to assure that WC_TEST_RET_ENC() can correctly handle all error codes.

tested with wolfssl-multi-test.sh ... commit-test-potpourri super-quick-check

also tested with

./configure --quiet --disable-jobserver --enable-fips=disabled --enable-all --disable-all-osp --enable-sniffer --enable-singlethreaded --disable-crl-monitor
./configure --quiet --disable-jobserver --enable-fips=disabled --enable-all --enable-sniffer
douzzer commented 1 week ago

retest this please

douzzer commented 1 week ago

not ready for merge yet -- offline testing by @lealem47 found bug(s).

douzzer commented 1 week ago

should be ready for merge now, but this effort uncovered nondeterministic bugs in snifferTest that need attention. @lealem47 repro'd and knows the details.