--- src/tls/tls_client.c.orig 2016-03-16 09:45:17.686921418 +0100 +++ src/tls/tls_client.c 2016-03-16 09:46:24.431617807 +0100 @@ -369,6 +369,12 @@ SSL_CTX_set_security_level(client_ctx, 0); #endif + /* Keep memory usage as low as possible */ + +#ifdef SSL_MODE_RELEASE_BUFFERS + SSL_CTX_set_mode(client_ctx, SSL_MODE_RELEASE_BUFFERS); +#endif + /* * See the verify callback in tls_verify.c */ --- src/tls/tls_server.c.orig 2016-03-16 09:45:39.487150299 +0100 +++ src/tls/tls_server.c 2016-03-16 09:51:32.230678857 +0100 @@ -451,6 +451,12 @@ SSL_CTX_set_security_level(server_ctx, 0); #endif + /* Keep memory usage as low as possible */ + +#ifdef SSL_MODE_RELEASE_BUFFERS + SSL_CTX_set_mode(server_ctx, SSL_MODE_RELEASE_BUFFERS); +#endif + /* * See the verify callback in tls_verify.c */