Skip to content

Commit 609e5be

Browse files
committed
Clear CIDs on potential session resumption
Updates the flight0handler to clear connection IDs in the event the client is attempting to resume an existing session. If connection IDs are to be used in the resumed session, they should be negotiated afresh. https://datatracker.ietf.org/doc/html/rfc9146#section-3 Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
1 parent e142ee1 commit 609e5be

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

flight0handler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ func flight0Parse(_ context.Context, _ flightConn, state *State, cache *handshak
2222
// No valid message received. Keep reading
2323
return 0, nil, nil
2424
}
25+
26+
// Connection Identifiers must be negotiated afresh on session resumption.
27+
// https://datatracker.ietf.org/doc/html/rfc9146#name-the-connection_id-extension
28+
state.localConnectionID = nil
29+
state.remoteConnectionID = nil
30+
2531
state.handshakeRecvSequence = seq
2632

2733
var clientHello *handshake.MessageClientHello

0 commit comments

Comments
 (0)