check the validity of transport parameters when unmarshalling

This commit is contained in:
Marten Seemann
2018-11-03 10:08:44 +07:00
parent 8cdb903a1c
commit c302d8ff81
5 changed files with 26 additions and 26 deletions

View File

@@ -1,7 +1,6 @@
package handshake
import (
"bytes"
"time"
"github.com/lucas-clemente/quic-go/internal/protocol"
@@ -99,13 +98,6 @@ var _ = Describe("TLS Extension Handler, for the server", func() {
Expect(err).To(HaveOccurred()) // this will be some kind of decoding error
})
It("rejects messages that contain a stateless reset token", func() {
parameters.StatelessResetToken = bytes.Repeat([]byte{0}, 16)
ext := getClientHello(parameters)
err := handler.ReceivedExtensions(uint8(typeClientHello), []qtls.Extension{ext})
Expect(err).To(MatchError("client sent a stateless reset token"))
})
Context("Version Negotiation", func() {
It("accepts a ClientHello, when no version negotiation was performed", func() {
done := make(chan struct{})