소스 검색

crypto/tls: fix clientHelloMsg fuzzer not to generate the RI SCSV

It was causing mysterious fuzzing failure because it affects the
unmarshaling of the secureNegotiationSupported field.
v1.2.3
EKR 7 년 전
committed by Peter Wu
부모
커밋
ed06c77b1d
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +5
    -1
      handshake_messages_test.go

+ 5
- 1
handshake_messages_test.go 파일 보기

@@ -121,7 +121,11 @@ func (*clientHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value {
m.sessionId = randomBytes(rand.Intn(32), rand)
m.cipherSuites = make([]uint16, rand.Intn(63)+1)
for i := 0; i < len(m.cipherSuites); i++ {
m.cipherSuites[i] = uint16(rand.Int31())
cs := uint16(rand.Int31())
if cs == scsvRenegotiation {
cs += 1
}
m.cipherSuites[i] = cs
}
m.compressionMethods = randomBytes(rand.Intn(63)+1, rand)
if rand.Intn(10) > 5 {


불러오는 중...
취소
저장