don't return a stateless reset token when adding a new connection ID

Both server and client didn't make use of the token. It was only used by
the connIDGenerator.
This commit is contained in:
Marten Seemann 2020-01-14 17:33:52 +07:00
parent 44c1092ed7
commit 634169b061
9 changed files with 51 additions and 44 deletions

View file

@ -295,14 +295,6 @@ var _ = Describe("Packet Handler Map", func() {
statelessResetKey = key
})
It("generates stateless reset tokens when adding new sessions", func() {
connID1 := []byte{0xde, 0xad, 0xbe, 0xef}
connID2 := []byte{0xde, 0xca, 0xfb, 0xad}
token1 := handler.Add(connID1, nil)
Expect(handler.Add(connID1, nil)).To(Equal(token1))
Expect(handler.Add(connID2, nil)).ToNot(Equal(token1))
})
It("generates stateless reset tokens", func() {
connID1 := []byte{0xde, 0xad, 0xbe, 0xef}
connID2 := []byte{0xde, 0xca, 0xfb, 0xad}