1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 20:15:03 -05:00

OpenSSL: Use SSL_MODE_RELEASE_BUFFERS if available, reduces memory use

See also :
http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
This commit is contained in:
Cristian Rodríguez 2011-08-03 22:20:45 +02:00 committed by Daniel Stenberg
parent 339fef4440
commit 3d919440c8
2 changed files with 4 additions and 3 deletions

View File

@ -43,9 +43,6 @@ To be addressed in 7.21.8 (or 7.22.0?)
http://curl.haxx.se/mail/lib-2011-07/0186.html and
http://curl.haxx.se/mail/lib-2011-08/0008.html
305 - "Use SSL_MODE_RELEASE_BUFFERS if available," by Cristian Rodríguez
http://curl.haxx.se/mail/lib-2011-08/0017.html
306 - SSL Sessions shared by Alejandro Alvarez Ayllon
http://curl.haxx.se/mail/lib-2011-08/0002.html

View File

@ -1489,6 +1489,10 @@ ossl_connect_step1(struct connectdata *conn,
return CURLE_OUT_OF_MEMORY;
}
#ifdef SSL_MODE_RELEASE_BUFFERS
SSL_CTX_set_mode(connssl->ctx, SSL_MODE_RELEASE_BUFFERS);
#endif
#ifdef SSL_CTRL_SET_MSG_CALLBACK
if(data->set.fdebug && data->set.verbose) {
/* the SSL trace callback is only used for verbose logging so we only