From 0c4962f913db6d9ad7c301697a4721be0e99b9fa Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 1 Sep 2015 15:41:57 +0200 Subject: ssl: don't allocate the write buffer during the handshake and save 16kB of RAM SSL Handshake does not need the write buffer, let's not allocate it and save 16kB of buffers during the handshake. It will be allocated later, once the init_buf is released. The memory needed per handshake reduces from about 92kB to about 76kB. --- ssl/s23_srvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 470bd3d..31afd02 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -262,7 +262,7 @@ int ssl23_get_client_hello(SSL *s) /* read the initial header */ v[0] = v[1] = 0; - if (!ssl3_setup_buffers(s)) + if (!ssl3_setup_read_buffer(s)) goto err; n = ssl23_read_bytes(s, sizeof buf_space); -- 1.7.12.1