drop 0-RTT write keys when receiving the 1-RTT keys

This commit is contained in:
Marten Seemann 2019-08-11 13:10:25 +07:00
parent 40a993e31c
commit 22abcfe6fb
2 changed files with 4 additions and 12 deletions

View file

@ -720,18 +720,6 @@ var _ = Describe("Crypto Setup TLS", func() {
Expect(server.ConnectionState().DidResume).To(BeTrue())
Expect(client.ConnectionState().DidResume).To(BeTrue())
opener, err := server.Get0RTTOpener()
Expect(err).ToNot(HaveOccurred())
Expect(opener).ToNot(BeNil())
sealer, err := client.Get0RTTSealer()
Expect(err).ToNot(HaveOccurred())
Expect(sealer).ToNot(BeNil())
// use the 0-RTT sealer and opener to encrypt and decrypt a message
plaintext := []byte("Lorem ipsum dolor sit amet")
msg := sealer.Seal(nil, plaintext, 0x1337, []byte("foobar"))
decrypted, err := opener.Open(nil, msg, 0x1337, []byte("foobar"))
Expect(err).ToNot(HaveOccurred())
Expect(decrypted).To(Equal(plaintext))
})
})
})