diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-10-28 19:53:10 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-10-28 19:53:10 +0000 |
commit | e6e11f4ec3401d64a0f11fd84396faf1dc855c13 (patch) | |
tree | c7ebfd1cadc11c9d05913d8461e852aebcbb7114 /ssl/s3_clnt.c | |
parent | 452e41562cdf7bd40706d2dfe5318dceefdc5fb3 (diff) |
Don't attempt session resumption if no ticket is present and session
ID length is zero.
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r-- | ssl/s3_clnt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 7791b14508..a76162646e 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -594,9 +594,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; |