Skip to content

Commit

Permalink
crypto/tls: remove version check when unmarshaling sessionState
Browse files Browse the repository at this point in the history
This was causing issues when fuzzing with
TestMarshalUnmarshal since the test would
occassionally set the version to VersionTLS13,
which would fail when unmarshaling. The check
doesn't add much in practice, and there is no
harm in removing it to de-flake the test.

Fixes golang#38902

Change-Id: I0906c570e9ed69c85fdd2c15f1b52f9e372c62e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/234486
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
  • Loading branch information
katiehockman authored and FiloSottile committed May 18, 2020
1 parent 0d39dba commit 185c3d4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/crypto/tls/ticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func (m *sessionState) unmarshal(data []byte) bool {
*m = sessionState{usedOldKey: m.usedOldKey}
s := cryptobyte.String(data)
if ok := s.ReadUint16(&m.vers) &&
m.vers != VersionTLS13 &&
s.ReadUint16(&m.cipherSuite) &&
readUint64(&s, &m.createdAt) &&
readUint16LengthPrefixed(&s, &m.masterSecret) &&
Expand Down

0 comments on commit 185c3d4

Please sign in to comment.