Read 0-RTT data in Bogo.
Change-Id: I878dfb9f5d3736c3ec0d5fa39052cca58932dbb7
Reviewed-on: https://boringssl-review.googlesource.com/12981
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/test/runner/common.go b/ssl/test/runner/common.go
index acb4114..668f78c 100644
--- a/ssl/test/runner/common.go
+++ b/ssl/test/runner/common.go
@@ -414,6 +414,13 @@
// with the PSK cipher suites.
PreSharedKeyIdentity string
+ // MaxEarlyDataSize controls the maximum number of bytes that the
+ // server will accept in early data and advertise in a
+ // NewSessionTicketMsg. If 0, no early data will be accepted and
+ // the TicketEarlyDataInfo extension in the NewSessionTicketMsg
+ // will be omitted.
+ MaxEarlyDataSize uint32
+
// SRTPProtectionProfiles, if not nil, is the list of SRTP
// protection profiles to offer in DTLS-SRTP.
SRTPProtectionProfiles []uint16
@@ -956,11 +963,6 @@
// receipt of a NewSessionTicket message.
ExpectNoNewSessionTicket bool
- // SendTicketEarlyDataInfo, if non-zero, is the maximum amount of data that we
- // will accept as early data, and gets sent in the ticket_early_data_info
- // extension of the NewSessionTicket message.
- SendTicketEarlyDataInfo uint32
-
// DuplicateTicketEarlyDataInfo causes an extra empty extension of
// ticket_early_data_info to be sent in NewSessionTicket.
DuplicateTicketEarlyDataInfo bool
@@ -1139,6 +1141,14 @@
// early data and includes that PSK in its ClientHello.
SendEarlyData [][]byte
+ // ExpectEarlyData causes a TLS 1.3 server to read application
+ // data after the ClientHello (assuming the server is able to
+ // derive the key under which the data is encrypted) before it
+ // sends a ServerHello. It checks that the application data it
+ // reads matches what is provided in ExpectEarlyData and errors if
+ // the number of records or their content do not match.
+ ExpectEarlyData [][]byte
+
// SendHalfRTTData causes a TLS 1.3 server to send the provided
// data in application data records before reading the client's
// Finished message.