From 1088b2c6b6f8681c95431e5fe43a33b646c3fb4c Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" Date: Thu, 11 Apr 2002 16:14:04 +0000 Subject: [PATCH] Ah, so nice. The default behaviour is session caching on, with a cache size of 20000 entries! Well, if each entry takes 12K, yikes. Well, who knows how much memory this would eat up. Anyway, I turned the session cache off since there is no point; tmcc exits, and so there is nothing to cache. On the other hand, I probably do not understand this caching, but no time to mess with it. Lets see what happens ... --- tmcd/ssl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tmcd/ssl.c b/tmcd/ssl.c index 2a02e5e68..e64943a4f 100644 --- a/tmcd/ssl.c +++ b/tmcd/ssl.c @@ -117,6 +117,11 @@ tmcd_server_sslinit(void) SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); + /* + * No session caching! Useless and eats up memory. + */ + SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); + return 0; } @@ -184,6 +189,11 @@ tmcd_client_sslinit(void) SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); + /* + * No session caching! Useless and eats up memory. + */ + SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); + return 0; } @@ -471,6 +481,7 @@ tmcd_sslclose(int sock) } SSL_free(ssl); ssl = NULL; + ERR_clear_error(); } nosslbuflen = 0; close(sock); -- GitLab