Fix from stable branch.
[openssl.git] / ssl / s3_clnt.c
index 8141a5c6a14bf6e2ba4ace8402ecb2dafe4b7538..09883eaa88c21af78f3a381ba55c458ac528a233 100644 (file)
@@ -295,7 +295,10 @@ int ssl3_connect(SSL *s)
                        if (ret == 2)
                                {
                                s->hit = 1;
                        if (ret == 2)
                                {
                                s->hit = 1;
-                               s->state=SSL3_ST_CR_FINISHED_A;
+                               if (s->tlsext_ticket_expected)
+                                       s->state=SSL3_ST_CR_SESSION_TICKET_A;
+                               else
+                                       s->state=SSL3_ST_CR_FINISHED_A;
                                s->init_num=0;
                                break;
                                }
                                s->init_num=0;
                                break;
                                }