Fix session ticket and SNI
[openssl.git] / ssl / t1_lib.c
index 8f16668e9d3a87522b034ea18d96b3594a56c858..20d67876a0c06b78bfb1fb8b459e495595038135 100644 (file)
@@ -1502,6 +1502,9 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *buf,
             return NULL;
         s2n(TLSEXT_TYPE_session_ticket, ret);
         s2n(0, ret);
+    } else {
+        /* if we don't add the above TLSEXT, we can't add a session ticket later */
+        s->tlsext_ticket_expected = 0;
     }
 
     if (s->tlsext_status_expected) {