PR: 2028
[openssl.git] / ssl / t1_lib.c
index bd849ac593a4344357729de3cb03f861ca02fbb3..4d6789264d381d7b16774d7014f19841ef2c112c 100644 (file)
@@ -1444,6 +1444,14 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
                return 1;
        if (p >= limit)
                return -1;
+       /* Skip past DTLS cookie */
+       if (s->version == DTLS1_VERSION || s->version == DTLS1_BAD_VER)
+               {
+               i = *(p++);
+               p+= i;
+               if (p >= limit)
+                       return -1;
+               }
        /* Skip past cipher list */
        n2s(p, i);
        p+= i;