Skip to content

Commit 60ae793

Browse files
committed
quic: don't send session tickets
The crypto/tls QUIC session ticket API may change prior to the go1.21 release (see golang/go#60107). Drop session tickets entirely for now. We can revisit this when adding 0-RTT support later, which will also need to interact with session tickets. For golang/go#58547 Change-Id: Ib24c456508e39ed11fa284ca3832ba61dc5121f3 Reviewed-on: https://go-review.googlesource.com/c/net/+/514999 Run-TryBot: Damien Neil <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]>
1 parent a7da556 commit 60ae793

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

internal/quic/conn_id_test.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ func TestConnIDPeerWithZeroLengthConnIDSendsNewConnectionID(t *testing.T) {
229229
// An endpoint that selects a zero-length connection ID during the handshake
230230
// cannot issue a new connection ID."
231231
// https://www.rfc-editor.org/rfc/rfc9000#section-5.1.1-8
232-
tc := newTestConn(t, clientSide, func(c *tls.Config) {
233-
c.SessionTicketsDisabled = true
234-
})
232+
tc := newTestConn(t, clientSide)
235233
tc.peerConnID = []byte{}
236234
tc.ignoreFrame(frameTypeAck)
237235
tc.uncheckedHandshake()

internal/quic/conn_loss_test.go

-8
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,9 @@ func TestLostHandshakeDoneFrame(t *testing.T) {
224224

225225
tc.wantFrame("server sends HANDSHAKE_DONE after handshake completes",
226226
packetType1RTT, debugFrameHandshakeDone{})
227-
tc.wantFrame("server sends session ticket in CRYPTO frame",
228-
packetType1RTT, debugFrameCrypto{
229-
data: tc.cryptoDataOut[tls.QUICEncryptionLevelApplication],
230-
})
231227

232228
tc.triggerLossOrPTO(packetType1RTT, pto)
233229
tc.wantFrame("server resends HANDSHAKE_DONE",
234230
packetType1RTT, debugFrameHandshakeDone{})
235-
tc.wantFrame("server resends session ticket",
236-
packetType1RTT, debugFrameCrypto{
237-
data: tc.cryptoDataOut[tls.QUICEncryptionLevelApplication],
238-
})
239231
})
240232
}

internal/quic/tls.go

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ func (c *Conn) handleTLSEvents(now time.Time) error {
7272
// at the server when the handshake completes."
7373
// https://www.rfc-editor.org/rfc/rfc9001#section-4.1.2-1
7474
c.confirmHandshake(now)
75-
if !c.config.TLSConfig.SessionTicketsDisabled {
76-
if err := c.tls.SendSessionTicket(false); err != nil {
77-
return err
78-
}
79-
}
8075
}
8176
case tls.QUICTransportParameters:
8277
params, err := unmarshalTransportParams(e.Data)

internal/quic/tls_test.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func handshakeDatagrams(tc *testConn) (dgrams []*testDatagram) {
172172
}},
173173
paddedSize: 1200,
174174
}, {
175-
// Server HANDSHAKE_DONE and session ticket
175+
// Server HANDSHAKE_DONE
176176
packets: []*testPacket{{
177177
ptype: packetType1RTT,
178178
num: 1,
@@ -182,7 +182,6 @@ func handshakeDatagrams(tc *testConn) (dgrams []*testDatagram) {
182182
ranges: []i64range[packetNumber]{{0, 1}},
183183
},
184184
debugFrameHandshakeDone{},
185-
debugFrameCrypto{},
186185
},
187186
}},
188187
}, {
@@ -351,9 +350,7 @@ func TestConnKeysDiscardedClient(t *testing.T) {
351350
}
352351

353352
func TestConnKeysDiscardedServer(t *testing.T) {
354-
tc := newTestConn(t, serverSide, func(c *tls.Config) {
355-
c.SessionTicketsDisabled = true
356-
})
353+
tc := newTestConn(t, serverSide)
357354
tc.ignoreFrame(frameTypeAck)
358355

359356
tc.writeFrames(packetTypeInitial,

0 commit comments

Comments
 (0)