e86b4cb85a
- Use SSL_MODE_RELEASE_BUFFERS if available, see SSL_CTX_set_mode man page and http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html for the full details. OBS-URL: https://build.opensuse.org/request/show/87151 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=97
30 lines
734 B
Diff
30 lines
734 B
Diff
--- src/tls/tls_client.c.orig
|
|
+++ src/tls/tls_client.c
|
|
@@ -372,6 +372,12 @@ TLS_APPL_STATE *tls_client_init(const TL
|
|
return (0);
|
|
}
|
|
|
|
+ /* 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
|
|
+++ src/tls/tls_server.c
|
|
@@ -381,6 +381,11 @@ TLS_APPL_STATE *tls_server_init(const TL
|
|
tls_print_errors();
|
|
return (0);
|
|
}
|
|
+
|
|
+ /* 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
|