Rewrite TLS protocol tests as a single process
There are a couple of different ways of writing unit tests for TLS handshake/record protocols in GnuTLS:
- Run a TLS server and client in separate processes, communicate through FDs created using
socketpair
- Run both a TLS server and client in a single process, using helper macros such as
HANDSHAKE
, defined in tests/eagain-common.h
While the former could emulate a more practical scenario, it has a portability problem (the tests written in this way cannot run on Windows, and thus are skipped) as well as makes debugging hard. It would be nice if we could port those tests in the latter style.
Tests under tests/tls13/ are a good candidate for the rewrite. 75409830 is an example of such rewrite.