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.31k stars 823 forks source link

20240614-WOLFSSL_MSG-code-points #7647

Closed douzzer closed 3 months ago

douzzer commented 3 months ago

add --debug-code-points and WOLFSSL_DEBUG_CODEPOINTS,

add file_name and line_number args to wolfssl_log(),

and inside WOLFSSL_DEBUG_CODEPOINTS gates,

add WOLFSSL_MSG_EX2(), WOLFSSL_MSG2(), WOLFSSL_ENTER2(), and WOLFSSL_LEAVE2(), each with file and line args,

and add wrapper macros for WOLFSSL_MSG, WOLFSSL_MSG_EX, WOLFSSL_ENTER, and WOLFSSL_LEAVE, that pass in file and line.

example output, from unit.test -test_wolfSSL_SESSION:

starting unit tests...
 Begin API Tests
[src/ssl.c L 5594] wolfSSL Entering wolfSSL_Init
[wolfcrypt/src/wc_port.c L 146] wolfSSL Entering wolfCrypt_Init
[wolfcrypt/src/random.c L 2249] RNG_HEALTH_TEST_CHECK_SIZE = 128
[wolfcrypt/src/random.c L 2251] sizeof(seedB_data)         = 128
[wolfcrypt/src/random.c L 3995] opened /dev/urandom.
[wolfcrypt/src/random.c L 4009] rnd read...
   643: test_wolfSSL_SESSION                                :[src/tls.c L 15280] wolfSSL Entering TLSv1_2_client_method_ex
[src/ssl.c L 1031] wolfSSL Entering wolfSSL_CTX_new_ex
[./src/ssl_certman.c L 91] wolfSSL Entering wolfSSL_CertManagerNew
[./src/ssl_certman.c L 93] heap param is null
[./src/ssl_certman.c L 99] DYNAMIC_TYPE_CERT_MANAGER Allocating = 368 bytes
[...]
douzzer commented 3 months ago

retest this please