summaryrefslogtreecommitdiffstats
path: root/ssl/t1_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-09-03 22:17:11 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-09-03 22:17:11 +0000
commite8da6a1d0fd119e170df49e1f5e28f980794144d (patch)
tree5a730c51ab0762018664dbdcea800f94a687bbc4 /ssl/t1_lib.c
parent305514000c7e404490951f4c14a65379098c7baf (diff)
Fix from stable branch.
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r--ssl/t1_lib.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index bde52b126b..dc0396cfaa 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -1388,6 +1388,13 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
/* Point after session ID in client hello */
const unsigned char *p = session_id + len;
unsigned short i;
+
+ /* If tickets disabled behave as if no ticket present
+ * to permit stateful resumption.
+ */
+ if (SSL_get_options(s) & SSL_OP_NO_TICKET)
+ return 1;
+
if ((s->version <= SSL3_VERSION) || !limit)
return 1;
if (p >= limit)
@@ -1419,8 +1426,8 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
* trigger a full handshake
*/
if (SSL_get_options(s) & SSL_OP_NO_TICKET)
- return 0;
- /* If zero length not client will accept a ticket
+ return 1;
+ /* If zero length note client will accept a ticket
* and indicate cache miss to trigger full handshake
*/
if (size == 0)