Skip to content

Instantly share code, notes, and snippets.

@yossigo
yossigo / tlstest.c
Created July 4, 2019 14:42
A small client that tests TLS renegotiation in the middle of sending a Redis command.
/* A small test client that:
* 1. Establishes a TLS connection with Redis.
* 2. Starts sending a request, getting Redis to read it.
* 3. Before completing the command, initiates renegotiation.
*
* This basically aims to test the ability of the TLS implementation
* to respond while busy in an SSL_read() type of operation.
*/
#include <sys/socket.h>
#include <resolv.h>