LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package tls | 5 package tls |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "flag" | 9 "flag" |
10 "io" | 10 "io" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 var connect = flag.Bool("connect", false, "connect to a TLS server on :10443") | 44 var connect = flag.Bool("connect", false, "connect to a TLS server on :10443") |
45 | 45 |
46 func TestRunClient(t *testing.T) { | 46 func TestRunClient(t *testing.T) { |
47 if !*connect { | 47 if !*connect { |
48 return | 48 return |
49 } | 49 } |
50 | 50 |
51 testConfig.CipherSuites = []uint16{TLS_ECDHE_RSA_WITH_RC4_128_SHA} | 51 testConfig.CipherSuites = []uint16{TLS_ECDHE_RSA_WITH_RC4_128_SHA} |
52 | 52 |
53 » conn, err := Dial("tcp", "", "127.0.0.1:10443", testConfig) | 53 » conn, err := Dial("tcp", "127.0.0.1:10443", testConfig) |
54 if err != nil { | 54 if err != nil { |
55 t.Fatal(err) | 55 t.Fatal(err) |
56 } | 56 } |
57 | 57 |
58 conn.Write([]byte("hello\n")) | 58 conn.Write([]byte("hello\n")) |
59 conn.Close() | 59 conn.Close() |
60 } | 60 } |
61 | 61 |
62 // Script of interaction with gnutls implementation. | 62 // Script of interaction with gnutls implementation. |
63 // The values for this test are obtained by building and running in client mode: | 63 // The values for this test are obtained by building and running in client mode: |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 { | 203 { |
204 0x14, 0x03, 0x01, 0x00, 0x01, 0x01, 0x16, 0x03, | 204 0x14, 0x03, 0x01, 0x00, 0x01, 0x01, 0x16, 0x03, |
205 0x01, 0x00, 0x24, 0xea, 0x88, 0x9c, 0x00, 0xf6, | 205 0x01, 0x00, 0x24, 0xea, 0x88, 0x9c, 0x00, 0xf6, |
206 0x35, 0xb8, 0x42, 0x7f, 0x15, 0x17, 0x76, 0x5e, | 206 0x35, 0xb8, 0x42, 0x7f, 0x15, 0x17, 0x76, 0x5e, |
207 0x4b, 0x24, 0xcb, 0x7e, 0xa0, 0x7b, 0xc3, 0x70, | 207 0x4b, 0x24, 0xcb, 0x7e, 0xa0, 0x7b, 0xc3, 0x70, |
208 0x52, 0x0a, 0x88, 0x2a, 0x7a, 0x45, 0x59, 0x90, | 208 0x52, 0x0a, 0x88, 0x2a, 0x7a, 0x45, 0x59, 0x90, |
209 0x59, 0xac, 0xc6, 0xb5, 0x56, 0x55, 0x96, | 209 0x59, 0xac, 0xc6, 0xb5, 0x56, 0x55, 0x96, |
210 }, | 210 }, |
211 } | 211 } |
LEFT | RIGHT |