* feat: added semaphore around `TLSSocket_performHandshake`
* fix: improved error checking in TLS read and write
* removed useless semaphore for renegotiation lock
* added some tls debug and cleared the session renegotiation events
* using mbedtls API instead of using internals
* fixed deadlock situation with TLSSocket_read
* test fix sonarcloud minor notice
* still some sonarcloud minor things
---------
Co-authored-by: Federico Francescon <federico.francescon@higeco.com>
Add a method to be able to reset the CRL, otherwise any previously
added CRL will stay there until the object is totally destroyed.
This proves to be needed for cases when we need to delete the
CRL (ie. it expired) during the lifetime of the server.
The memcpy is done before assigning the length, so the length is not
set and is therefore either 0 (so no peer certificate will be available)
or a random number (that can lead to crashes) making the feature not work.
The MR simply copies first the length that will make the memcpy work.