openssl: Disable session tickets

This commit is contained in:
Attila Molnar 2015-02-09 21:18:32 +01:00
parent bc75c3ae0e
commit 6b6a579925

View file

@ -315,6 +315,9 @@ rb_init_ssl(void)
SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_CIPHER_SERVER_PREFERENCE SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_CIPHER_SERVER_PREFERENCE
#ifdef SSL_OP_SINGLE_DH_USE #ifdef SSL_OP_SINGLE_DH_USE
| SSL_OP_SINGLE_DH_USE | SSL_OP_SINGLE_DH_USE
#endif
#ifdef SSL_OP_NO_TICKET
| SSL_OP_NO_TICKET
#endif #endif
); );
SSL_CTX_set_verify(ssl_server_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_accept_all_cb); SSL_CTX_set_verify(ssl_server_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_accept_all_cb);
@ -343,6 +346,11 @@ rb_init_ssl(void)
get_ssl_error(ERR_get_error())); get_ssl_error(ERR_get_error()));
ret = 0; ret = 0;
} }
#ifdef SSL_OP_NO_TICKET
SSL_CTX_set_options(ssl_client_ctx, SSL_OP_NO_TICKET);
#endif
return ret; return ret;
} }