disable check for diversification nonce public flag bit

see #232
This commit is contained in:
Marten Seemann
2016-07-31 16:15:51 +07:00
committed by Lucas Clemente
parent 5ec7ee7f01
commit 956bfa2d5a
2 changed files with 6 additions and 4 deletions

View File

@@ -107,9 +107,11 @@ func ParsePublicHeader(b io.ByteReader) (*PublicHeader, error) {
header.VersionFlag = publicFlagByte&0x01 > 0
header.ResetFlag = publicFlagByte&0x02 > 0
if publicFlagByte&0x04 > 0 {
return nil, errors.New("diversification nonces should only be sent by servers")
}
// TODO: activate this check once Chrome sends the correct value
// see https://github.com/lucas-clemente/quic-go/issues/232
// if publicFlagByte&0x04 > 0 {
// return nil, errors.New("diversification nonces should only be sent by servers")
// }
if publicFlagByte&0x08 == 0 {
return nil, errReceivedTruncatedConnectionID

View File

@@ -66,7 +66,7 @@ var _ = Describe("Public Header", func() {
Expect(b.Len()).To(BeZero())
})
It("rejects diversification nonces sent by the client", func() {
PIt("rejects diversification nonces sent by the client", func() {
b := bytes.NewReader([]byte{0x0c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
0x01,