Don't attempt session resumption if no ticket is present and session

ID length is zero.
This commit is contained in:
Dr. Stephen Henson 2009-10-28 19:52:35 +00:00
parent 90528846e8
commit 257b2bfb6c

View file

@ -618,9 +618,15 @@ int ssl3_client_hello(SSL *s)
buf=(unsigned char *)s->init_buf->data;
if (s->state == SSL3_ST_CW_CLNT_HELLO_A)
{
if ((s->session == NULL) ||
(s->session->ssl_version != s->version) ||
(s->session->not_resumable))
SSL_SESSION *sess = s->session;
if ((sess == NULL) ||
(sess->ssl_version != s->version) ||
#ifdef OPENSSL_NO_TLSEXT
!sess->session_id_length ||
#else
(!sess->session_id_length && !sess->tlsext_tick) ||
#endif
(sess->not_resumable))
{
if (!ssl_get_new_session(s,0))
goto err;