mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 21:27:35 +03:00
declare the handshake confirmed when receiving an ACK for a 1-RTT packet
... on the client side. Both the receipt of HANDSHAKE_DONE and the receipt of an ACK for a 1-RTT packet are sufficient for declaring confirmation of the handshake.
This commit is contained in:
parent
3138a45fde
commit
17d9860db6
6 changed files with 154 additions and 65 deletions
|
@ -2564,6 +2564,18 @@ var _ = Describe("Client Session", func() {
|
|||
Expect(sess.handleHandshakeDoneFrame()).To(Succeed())
|
||||
})
|
||||
|
||||
It("interprets an ACK for 1-RTT packets as confirmation of the handshake", func() {
|
||||
sess.peerParams = &wire.TransportParameters{}
|
||||
sph := mockackhandler.NewMockSentPacketHandler(mockCtrl)
|
||||
sess.sentPacketHandler = sph
|
||||
ack := &wire.AckFrame{AckRanges: []wire.AckRange{{Smallest: 1, Largest: 3}}}
|
||||
sph.EXPECT().ReceivedAck(ack, protocol.Encryption1RTT, gomock.Any()).Return(true, nil)
|
||||
sph.EXPECT().SetHandshakeConfirmed()
|
||||
cryptoSetup.EXPECT().SetLargest1RTTAcked(protocol.PacketNumber(3))
|
||||
cryptoSetup.EXPECT().SetHandshakeConfirmed()
|
||||
Expect(sess.handleAckFrame(ack, protocol.Encryption1RTT)).To(Succeed())
|
||||
})
|
||||
|
||||
Context("handling tokens", func() {
|
||||
var mockTokenStore *MockTokenStore
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue