diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index 54bfca58..7aa3c840 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -8443,10 +8443,23 @@ func addSessionTicketTests() { }, }, flags: []string{ + "-enable-early-data", "-expect-early-data-info", }, }) + // Test that 0-RTT tickets are ignored in clients unless opted in. + testCases = append(testCases, testCase{ + testType: clientTest, + name: "TLS13-SendTicketEarlyDataInfo-Disabled", + config: Config{ + MaxVersion: VersionTLS13, + Bugs: ProtocolBugs{ + SendTicketEarlyDataInfo: 16384, + }, + }, + }) + testCases = append(testCases, testCase{ testType: clientTest, name: "TLS13-DuplicateTicketEarlyDataInfo", diff --git a/ssl/tls13_client.c b/ssl/tls13_client.c index 774b8066..ad279f58 100644 --- a/ssl/tls13_client.c +++ b/ssl/tls13_client.c @@ -651,7 +651,7 @@ int tls13_process_new_session_ticket(SSL *ssl) { goto err; } - if (have_early_data_info) { + if (have_early_data_info && ssl->ctx->enable_early_data) { if (!CBS_get_u32(&early_data_info, &session->ticket_max_early_data) || CBS_len(&early_data_info) != 0) { ssl3_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR);