MXS-1739: Disable TLS session cache

Disabling the session cache prevents errors from being generated as the
default OpenSSL configuration is to enable session caching but with an
uninitialized context ID. In addition to preventing the errors, it
prevents the possible security problems implicated by the definition a
"static" context ID.
This commit is contained in:
Markus Mäkelä 2018-03-24 13:00:31 +02:00
parent 9b61947205
commit 933a74a418
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -290,6 +290,9 @@ listener_init_SSL(SSL_LISTENER *ssl_listener)
/** Disable SSLv3 */
SSL_CTX_set_options(ssl_listener->ctx, SSL_OP_NO_SSLv3);
// Disable session cache
SSL_CTX_set_session_cache_mode(ssl_listener->ctx, SSL_SESS_CACHE_OFF);
/** Generate the 512-bit and 1024-bit RSA keys */
if (rsa_512 == NULL && (rsa_512 = create_rsa(512)) == NULL)
{