summaryrefslogtreecommitdiff
path: root/libgo/go/crypto/tls/handshake_messages_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/crypto/tls/handshake_messages_test.go')
-rw-r--r--libgo/go/crypto/tls/handshake_messages_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/libgo/go/crypto/tls/handshake_messages_test.go b/libgo/go/crypto/tls/handshake_messages_test.go
index 23f729dd94b..dc68a12239a 100644
--- a/libgo/go/crypto/tls/handshake_messages_test.go
+++ b/libgo/go/crypto/tls/handshake_messages_test.go
@@ -14,13 +14,13 @@ import (
var tests = []interface{}{
&clientHelloMsg{},
&serverHelloMsg{},
+ &finishedMsg{},
&certificateMsg{},
&certificateRequestMsg{},
&certificateVerifyMsg{},
&certificateStatusMsg{},
&clientKeyExchangeMsg{},
- &finishedMsg{},
&nextProtoMsg{},
}
@@ -59,11 +59,12 @@ func TestMarshalUnmarshal(t *testing.T) {
break
}
- if i >= 2 {
- // The first two message types (ClientHello and
- // ServerHello) are allowed to have parsable
- // prefixes because the extension data is
- // optional.
+ if i >= 3 {
+ // The first three message types (ClientHello,
+ // ServerHello and Finished) are allowed to
+ // have parsable prefixes because the extension
+ // data is optional and the length of the
+ // Finished varies across versions.
for j := 0; j < len(marshaled); j++ {
if m2.unmarshal(marshaled[0:j]) {
t.Errorf("#%d unmarshaled a prefix of length %d of %#v", i, j, m1)