From e20b4d2a9a269651cbd39fd66a40caa56d4c4130 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 17 Aug 2018 19:56:39 +0700 Subject: [PATCH] don't generate a key share with Curve ID 0 in the ServerHello tests 0 is used as a sentinel value when determining if the key share should be marshalled. --- handshake_messages_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handshake_messages_test.go b/handshake_messages_test.go index 3b7246b..60ae6e7 100644 --- a/handshake_messages_test.go +++ b/handshake_messages_test.go @@ -210,7 +210,7 @@ func (*serverHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value { } if rand.Intn(10) > 5 { - m.keyShare.group = CurveID(rand.Intn(30000)) + m.keyShare.group = CurveID(rand.Intn(30000) + 1) m.keyShare.data = randomBytes(rand.Intn(300)+1, rand) } if rand.Intn(10) > 5 {