Commit 1088b2c6 authored by Leigh Stoller's avatar Leigh Stoller

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 ...
parent f70fa26c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment