98968dca72
The practice of storing reference connections for testing has worked reasonably well, but the large blocks of literal data in the .go files is ugly and updating the tests is a real problem because their number has grown. This CL changes the way that reference tests work. It's now possible to automatically update the tests and the test data is now stored in testdata/. This should make it easier to implement changes that affect all connections, like implementing the renegotiation extension. R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/42060044
87 lines
6.4 KiB
Plaintext
87 lines
6.4 KiB
Plaintext
>>> Flow 1 (client to server)
|
|
00000000 16 03 01 00 70 01 00 00 6c 03 03 00 00 00 00 00 |....p...l.......|
|
|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
|
|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 1a c0 2f |.............../|
|
|
00000030 c0 2b c0 11 c0 07 c0 13 c0 09 c0 14 c0 0a 00 05 |.+..............|
|
|
00000040 00 2f 00 35 c0 12 00 0a 01 00 00 29 00 05 00 05 |./.5.......)....|
|
|
00000050 01 00 00 00 00 00 0a 00 08 00 06 00 17 00 18 00 |................|
|
|
00000060 19 00 0b 00 02 01 00 00 0d 00 0a 00 08 04 01 04 |................|
|
|
00000070 03 02 01 02 03 |.....|
|
|
>>> Flow 2 (server to client)
|
|
00000000 16 03 01 00 54 02 00 00 50 03 01 52 ac 77 f7 24 |....T...P..R.w.$|
|
|
00000010 5b 96 60 d7 6a 2e 9f 05 ea 1e 61 15 64 16 ab a6 |[.`.j.....a.d...|
|
|
00000020 a8 4e 72 f2 09 14 c2 fd 64 2d 22 20 e9 e3 04 64 |.Nr.....d-" ...d|
|
|
00000030 7a 93 f1 de 0c d5 f9 5a 9a 5b d3 af 2b 03 84 bd |z......Z.[..+...|
|
|
00000040 69 71 dd 35 a7 ca 52 bf 90 a1 03 f0 c0 09 00 00 |iq.5..R.........|
|
|
00000050 08 00 0b 00 04 03 00 01 02 16 03 01 02 0e 0b 00 |................|
|
|
00000060 02 0a 00 02 07 00 02 04 30 82 02 00 30 82 01 62 |........0...0..b|
|
|
00000070 02 09 00 b8 bf 2d 47 a0 d2 eb f4 30 09 06 07 2a |.....-G....0...*|
|
|
00000080 86 48 ce 3d 04 01 30 45 31 0b 30 09 06 03 55 04 |.H.=..0E1.0...U.|
|
|
00000090 06 13 02 41 55 31 13 30 11 06 03 55 04 08 13 0a |...AU1.0...U....|
|
|
000000a0 53 6f 6d 65 2d 53 74 61 74 65 31 21 30 1f 06 03 |Some-State1!0...|
|
|
000000b0 55 04 0a 13 18 49 6e 74 65 72 6e 65 74 20 57 69 |U....Internet Wi|
|
|
000000c0 64 67 69 74 73 20 50 74 79 20 4c 74 64 30 1e 17 |dgits Pty Ltd0..|
|
|
000000d0 0d 31 32 31 31 32 32 31 35 30 36 33 32 5a 17 0d |.121122150632Z..|
|
|
000000e0 32 32 31 31 32 30 31 35 30 36 33 32 5a 30 45 31 |221120150632Z0E1|
|
|
000000f0 0b 30 09 06 03 55 04 06 13 02 41 55 31 13 30 11 |.0...U....AU1.0.|
|
|
00000100 06 03 55 04 08 13 0a 53 6f 6d 65 2d 53 74 61 74 |..U....Some-Stat|
|
|
00000110 65 31 21 30 1f 06 03 55 04 0a 13 18 49 6e 74 65 |e1!0...U....Inte|
|
|
00000120 72 6e 65 74 20 57 69 64 67 69 74 73 20 50 74 79 |rnet Widgits Pty|
|
|
00000130 20 4c 74 64 30 81 9b 30 10 06 07 2a 86 48 ce 3d | Ltd0..0...*.H.=|
|
|
00000140 02 01 06 05 2b 81 04 00 23 03 81 86 00 04 00 c4 |....+...#.......|
|
|
00000150 a1 ed be 98 f9 0b 48 73 36 7e c3 16 56 11 22 f2 |......Hs6~..V.".|
|
|
00000160 3d 53 c3 3b 4d 21 3d cd 6b 75 e6 f6 b0 dc 9a df |=S.;M!=.ku......|
|
|
00000170 26 c1 bc b2 87 f0 72 32 7c b3 64 2f 1c 90 bc ea |&.....r2|.d/....|
|
|
00000180 68 23 10 7e fe e3 25 c0 48 3a 69 e0 28 6d d3 37 |h#.~..%.H:i.(m.7|
|
|
00000190 00 ef 04 62 dd 0d a0 9c 70 62 83 d8 81 d3 64 31 |...b....pb....d1|
|
|
000001a0 aa 9e 97 31 bd 96 b0 68 c0 9b 23 de 76 64 3f 1a |...1...h..#.vd?.|
|
|
000001b0 5c 7f e9 12 0e 58 58 b6 5f 70 dd 9b d8 ea d5 d7 |\....XX._p......|
|
|
000001c0 f5 d5 cc b9 b6 9f 30 66 5b 66 9a 20 e2 27 e5 bf |......0f[f. .'..|
|
|
000001d0 fe 3b 30 09 06 07 2a 86 48 ce 3d 04 01 03 81 8c |.;0...*.H.=.....|
|
|
000001e0 00 30 81 88 02 42 01 88 a2 4f eb e2 45 c5 48 7d |.0...B...O..E.H}|
|
|
000001f0 1b ac f5 ed 98 9d ae 47 70 c0 5e 1b b6 2f bd f1 |.......Gp.^../..|
|
|
00000200 b6 4d b7 61 40 d3 11 a2 ce ee 0b 7e 92 7e ff 76 |.M.a@......~.~.v|
|
|
00000210 9d c3 3b 7e a5 3f ce fa 10 e2 59 ec 47 2d 7c ac |..;~.?....Y.G-|.|
|
|
00000220 da 4e 97 0e 15 a0 6f d0 02 42 01 4d fc be 67 13 |.N....o..B.M..g.|
|
|
00000230 9c 2d 05 0e bd 3f a3 8c 25 c1 33 13 83 0d 94 06 |.-...?..%.3.....|
|
|
00000240 bb d4 37 7a f6 ec 7a c9 86 2e dd d7 11 69 7f 85 |..7z..z......i..|
|
|
00000250 7c 56 de fb 31 78 2b e4 c7 78 0d ae cb be 9e 4e ||V..1x+..x.....N|
|
|
00000260 36 24 31 7b 6a 0f 39 95 12 07 8f 2a 16 03 01 00 |6$1{j.9....*....|
|
|
00000270 d5 0c 00 00 d1 03 00 17 41 04 65 02 4b f2 bc 54 |........A.e.K..T|
|
|
00000280 3d c2 42 3d 8d 06 b4 9a 7a 15 c8 04 0f 2b a0 f8 |=.B=....z....+..|
|
|
00000290 ee e8 5d 52 10 c3 36 30 e0 cc 34 67 bb 83 29 ea |..]R..60..4g..).|
|
|
000002a0 d3 47 56 54 95 c5 29 25 53 d8 97 15 66 69 f2 cb |.GVT..)%S...fi..|
|
|
000002b0 59 05 97 f7 ac 66 27 d9 19 4a 00 8a 30 81 87 02 |Y....f'..J..0...|
|
|
000002c0 41 6a 3c ca 93 ea 20 84 0e 04 2b 1b 52 28 32 29 |Aj<... ...+.R(2)|
|
|
000002d0 af b9 8d fb 1c 5c c3 02 6b 45 02 c7 25 4e 19 51 |.....\..kE..%N.Q|
|
|
000002e0 19 8b 3c 34 5d 20 b8 77 77 4a f1 b1 ba 47 03 14 |..<4] .wwJ...G..|
|
|
000002f0 09 74 42 df 82 39 b0 51 54 ad e9 4d 1a 9d b9 18 |.tB..9.QT..M....|
|
|
00000300 14 58 02 42 01 b8 18 1d a1 53 a2 52 ad a3 13 85 |.X.B.....S.R....|
|
|
00000310 f5 fb c4 75 0e 6b f1 f9 a6 7d 21 63 d0 fe 20 ba |...u.k...}!c.. .|
|
|
00000320 4b 38 3d 25 12 dc 73 5e 1d 5e 23 e5 52 ae cf 62 |K8=%..s^.^#.R..b|
|
|
00000330 5a f4 a5 11 b7 33 1e 08 06 32 bb 7f 8d 40 db 5f |Z....3...2...@._|
|
|
00000340 f7 39 93 0e 32 9e 16 03 01 00 04 0e 00 00 00 |.9..2..........|
|
|
>>> Flow 3 (client to server)
|
|
00000000 16 03 01 00 46 10 00 00 42 41 04 1e 18 37 ef 0d |....F...BA...7..|
|
|
00000010 19 51 88 35 75 71 b5 e5 54 5b 12 2e 8f 09 67 fd |.Q.5uq..T[....g.|
|
|
00000020 a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b 2d 4f 9e |.$ >.V...(^.+-O.|
|
|
00000030 f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 b6 d7 49 |...lK[.V.2B.X..I|
|
|
00000040 a6 b5 68 1a 41 03 56 6b dc 5a 89 14 03 01 00 01 |..h.A.Vk.Z......|
|
|
00000050 01 16 03 01 00 30 6d 72 30 82 5b 76 0b bd a7 a2 |.....0mr0.[v....|
|
|
00000060 ed 1e de bd 14 1d 25 69 97 4c ad 9c b1 50 8e 2f |......%i.L...P./|
|
|
00000070 a0 65 ac e7 52 e0 b4 fb f9 8c e7 26 09 96 53 6f |.e..R......&..So|
|
|
00000080 bc 77 24 8c 1f a7 |.w$...|
|
|
>>> Flow 4 (server to client)
|
|
00000000 14 03 01 00 01 01 16 03 01 00 30 a0 97 45 7d 58 |..........0..E}X|
|
|
00000010 2d 6e 6b 51 ad 5b 4f e0 f3 58 d3 48 a6 e1 b7 71 |-nkQ.[O..X.H...q|
|
|
00000020 f8 94 e2 fe c5 c9 b2 0b 27 4f 48 11 df 01 5f ef |........'OH..._.|
|
|
00000030 5d 9c f5 85 91 39 75 f4 21 1b ed |]....9u.!..|
|
|
>>> Flow 5 (client to server)
|
|
00000000 17 03 01 00 20 31 c0 13 eb 77 e7 51 f6 14 fc bd |.... 1...w.Q....|
|
|
00000010 94 32 2c 31 58 28 72 29 a9 6a 11 56 f2 c1 de 96 |.2,1X(r).j.V....|
|
|
00000020 e0 cd cf 4a 47 17 03 01 00 20 b2 95 e4 81 56 f3 |...JG.... ....V.|
|
|
00000030 f8 6a b1 4f a0 41 41 fd 1f 7e b8 bb 7f 71 80 0d |.j.O.AA..~...q..|
|
|
00000040 22 9f 46 be cb b9 b6 bd c0 0e 15 03 01 00 20 fa |".F........... .|
|
|
00000050 4e 05 c4 29 a5 92 4e 68 34 b7 5b 99 a8 b3 46 1b |N..)..Nh4.[...F.|
|
|
00000060 f9 f6 fc e5 b4 f4 cd c4 be 1a b2 af b7 13 43 |..............C|
|