introduce a type for the stateless reset key (#3621)

This commit is contained in:
Marten Seemann 2022-11-16 16:11:25 -06:00 committed by GitHub
parent b8447041bb
commit 8d496ebb5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 27 deletions

View file

@ -33,7 +33,7 @@ var _ = Describe("Packet Handler Map", func() {
packetChan chan packetToRead
connIDLen int
statelessResetKey []byte
statelessResetKey *StatelessResetKey
)
getPacketWithPacketType := func(connID protocol.ConnectionID, t protocol.PacketType, length protocol.ByteCount) []byte {
@ -440,9 +440,9 @@ var _ = Describe("Packet Handler Map", func() {
Context("generating", func() {
BeforeEach(func() {
key := make([]byte, 32)
rand.Read(key)
statelessResetKey = key
var key StatelessResetKey
rand.Read(key[:])
statelessResetKey = &key
})
It("generates stateless reset tokens", func() {