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
123 行
9.2 KiB
Plaintext
123 行
9.2 KiB
Plaintext
>>> Flow 1 (client to server)
|
|
00000000 16 03 01 00 5d 01 00 00 59 03 03 52 ac 77 f8 7c |....]...Y..R.w.||
|
|
00000010 ec cd d0 9c df d2 a6 8b 74 43 ed af 58 14 00 1f |........tC..X...|
|
|
00000020 3f 85 68 1d c9 3d 20 0a 61 87 33 00 00 04 00 05 |?.h..= .a.3.....|
|
|
00000030 00 ff 02 01 00 00 2b 00 0d 00 22 00 20 06 01 06 |......+...". ...|
|
|
00000040 02 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 |................|
|
|
00000050 01 03 02 03 03 02 01 02 02 02 03 01 01 00 0f 00 |................|
|
|
00000060 01 01 |..|
|
|
>>> Flow 2 (server to client)
|
|
00000000 16 03 03 00 2a 02 00 00 26 03 03 00 00 00 00 00 |....*...&.......|
|
|
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 05 00 16 |................|
|
|
00000030 03 03 02 be 0b 00 02 ba 00 02 b7 00 02 b4 30 82 |..............0.|
|
|
00000040 02 b0 30 82 02 19 a0 03 02 01 02 02 09 00 85 b0 |..0.............|
|
|
00000050 bb a4 8a 7f b8 ca 30 0d 06 09 2a 86 48 86 f7 0d |......0...*.H...|
|
|
00000060 01 01 05 05 00 30 45 31 0b 30 09 06 03 55 04 06 |.....0E1.0...U..|
|
|
00000070 13 02 41 55 31 13 30 11 06 03 55 04 08 13 0a 53 |..AU1.0...U....S|
|
|
00000080 6f 6d 65 2d 53 74 61 74 65 31 21 30 1f 06 03 55 |ome-State1!0...U|
|
|
00000090 04 0a 13 18 49 6e 74 65 72 6e 65 74 20 57 69 64 |....Internet Wid|
|
|
000000a0 67 69 74 73 20 50 74 79 20 4c 74 64 30 1e 17 0d |gits Pty Ltd0...|
|
|
000000b0 31 30 30 34 32 34 30 39 30 39 33 38 5a 17 0d 31 |100424090938Z..1|
|
|
000000c0 31 30 34 32 34 30 39 30 39 33 38 5a 30 45 31 0b |10424090938Z0E1.|
|
|
000000d0 30 09 06 03 55 04 06 13 02 41 55 31 13 30 11 06 |0...U....AU1.0..|
|
|
000000e0 03 55 04 08 13 0a 53 6f 6d 65 2d 53 74 61 74 65 |.U....Some-State|
|
|
000000f0 31 21 30 1f 06 03 55 04 0a 13 18 49 6e 74 65 72 |1!0...U....Inter|
|
|
00000100 6e 65 74 20 57 69 64 67 69 74 73 20 50 74 79 20 |net Widgits Pty |
|
|
00000110 4c 74 64 30 81 9f 30 0d 06 09 2a 86 48 86 f7 0d |Ltd0..0...*.H...|
|
|
00000120 01 01 01 05 00 03 81 8d 00 30 81 89 02 81 81 00 |.........0......|
|
|
00000130 bb 79 d6 f5 17 b5 e5 bf 46 10 d0 dc 69 be e6 2b |.y......F...i..+|
|
|
00000140 07 43 5a d0 03 2d 8a 7a 43 85 b7 14 52 e7 a5 65 |.CZ..-.zC...R..e|
|
|
00000150 4c 2c 78 b8 23 8c b5 b4 82 e5 de 1f 95 3b 7e 62 |L,x.#........;~b|
|
|
00000160 a5 2c a5 33 d6 fe 12 5c 7a 56 fc f5 06 bf fa 58 |.,.3...\zV.....X|
|
|
00000170 7b 26 3f b5 cd 04 d3 d0 c9 21 96 4a c7 f4 54 9f |{&?......!.J..T.|
|
|
00000180 5a bf ef 42 71 00 fe 18 99 07 7f 7e 88 7d 7d f1 |Z..Bq......~.}}.|
|
|
00000190 04 39 c4 a2 2e db 51 c9 7c e3 c0 4c 3b 32 66 01 |.9....Q.|..L;2f.|
|
|
000001a0 cf af b1 1d b8 71 9a 1d db db 89 6b ae da 2d 79 |.....q.....k..-y|
|
|
000001b0 02 03 01 00 01 a3 81 a7 30 81 a4 30 1d 06 03 55 |........0..0...U|
|
|
000001c0 1d 0e 04 16 04 14 b1 ad e2 85 5a cf cb 28 db 69 |..........Z..(.i|
|
|
000001d0 ce 23 69 de d3 26 8e 18 88 39 30 75 06 03 55 1d |.#i..&...90u..U.|
|
|
000001e0 23 04 6e 30 6c 80 14 b1 ad e2 85 5a cf cb 28 db |#.n0l......Z..(.|
|
|
000001f0 69 ce 23 69 de d3 26 8e 18 88 39 a1 49 a4 47 30 |i.#i..&...9.I.G0|
|
|
00000200 45 31 0b 30 09 06 03 55 04 06 13 02 41 55 31 13 |E1.0...U....AU1.|
|
|
00000210 30 11 06 03 55 04 08 13 0a 53 6f 6d 65 2d 53 74 |0...U....Some-St|
|
|
00000220 61 74 65 31 21 30 1f 06 03 55 04 0a 13 18 49 6e |ate1!0...U....In|
|
|
00000230 74 65 72 6e 65 74 20 57 69 64 67 69 74 73 20 50 |ternet Widgits P|
|
|
00000240 74 79 20 4c 74 64 82 09 00 85 b0 bb a4 8a 7f b8 |ty Ltd..........|
|
|
00000250 ca 30 0c 06 03 55 1d 13 04 05 30 03 01 01 ff 30 |.0...U....0....0|
|
|
00000260 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 03 81 |...*.H..........|
|
|
00000270 81 00 08 6c 45 24 c7 6b b1 59 ab 0c 52 cc f2 b0 |...lE$.k.Y..R...|
|
|
00000280 14 d7 87 9d 7a 64 75 b5 5a 95 66 e4 c5 2b 8e ae |....zdu.Z.f..+..|
|
|
00000290 12 66 1f eb 4f 38 b3 6e 60 d3 92 fd f7 41 08 b5 |.f..O8.n`....A..|
|
|
000002a0 25 13 b1 18 7a 24 fb 30 1d ba ed 98 b9 17 ec e7 |%...z$.0........|
|
|
000002b0 d7 31 59 db 95 d3 1d 78 ea 50 56 5c d5 82 5a 2d |.1Y....x.PV\..Z-|
|
|
000002c0 5a 5f 33 c4 b6 d8 c9 75 90 96 8c 0f 52 98 b5 cd |Z_3....u....R...|
|
|
000002d0 98 1f 89 20 5f f2 a0 1c a3 1b 96 94 dd a9 fd 57 |... _..........W|
|
|
000002e0 e9 70 e8 26 6d 71 99 9b 26 6e 38 50 29 6c 90 a7 |.p.&mq..&n8P)l..|
|
|
000002f0 bd d9 16 03 03 00 0f 0d 00 00 0b 02 01 40 00 04 |.............@..|
|
|
00000300 04 01 04 03 00 00 16 03 03 00 04 0e 00 00 00 |...............|
|
|
>>> Flow 3 (client to server)
|
|
00000000 16 03 03 02 0a 0b 00 02 06 00 02 03 00 02 00 30 |...............0|
|
|
00000010 82 01 fc 30 82 01 5e 02 09 00 9a 30 84 6c 26 35 |...0..^....0.l&5|
|
|
00000020 d9 17 30 09 06 07 2a 86 48 ce 3d 04 01 30 45 31 |..0...*.H.=..0E1|
|
|
00000030 0b 30 09 06 03 55 04 06 13 02 41 55 31 13 30 11 |.0...U....AU1.0.|
|
|
00000040 06 03 55 04 08 13 0a 53 6f 6d 65 2d 53 74 61 74 |..U....Some-Stat|
|
|
00000050 65 31 21 30 1f 06 03 55 04 0a 13 18 49 6e 74 65 |e1!0...U....Inte|
|
|
00000060 72 6e 65 74 20 57 69 64 67 69 74 73 20 50 74 79 |rnet Widgits Pty|
|
|
00000070 20 4c 74 64 30 1e 17 0d 31 32 31 31 31 34 31 33 | Ltd0...12111413|
|
|
00000080 32 35 35 33 5a 17 0d 32 32 31 31 31 32 31 33 32 |2553Z..221112132|
|
|
00000090 35 35 33 5a 30 41 31 0b 30 09 06 03 55 04 06 13 |553Z0A1.0...U...|
|
|
000000a0 02 41 55 31 0c 30 0a 06 03 55 04 08 13 03 4e 53 |.AU1.0...U....NS|
|
|
000000b0 57 31 10 30 0e 06 03 55 04 07 13 07 50 79 72 6d |W1.0...U....Pyrm|
|
|
000000c0 6f 6e 74 31 12 30 10 06 03 55 04 03 13 09 4a 6f |ont1.0...U....Jo|
|
|
000000d0 65 6c 20 53 69 6e 67 30 81 9b 30 10 06 07 2a 86 |el Sing0..0...*.|
|
|
000000e0 48 ce 3d 02 01 06 05 2b 81 04 00 23 03 81 86 00 |H.=....+...#....|
|
|
000000f0 04 00 95 8c 91 75 14 c0 5e c4 57 b4 d4 c3 6f 8d |.....u..^.W...o.|
|
|
00000100 ae 68 1e dd 6f ce 86 e1 7e 6e b2 48 3e 81 e5 4e |.h..o...~n.H>..N|
|
|
00000110 e2 c6 88 4b 64 dc f5 30 bb d3 ff 65 cc 5b f4 dd |...Kd..0...e.[..|
|
|
00000120 b5 6a 3e 3e d0 1d de 47 c3 76 ad 19 f6 45 2c 8c |.j>>...G.v...E,.|
|
|
00000130 bc d8 1d 01 4c 1f 70 90 46 76 48 8b 8f 83 cc 4a |....L.p.FvH....J|
|
|
00000140 5c 8f 40 76 da e0 89 ec 1d 2b c4 4e 30 76 28 41 |\.@v.....+.N0v(A|
|
|
00000150 b2 62 a8 fb 5b f1 f9 4e 7a 8d bd 09 b8 ae ea 8b |.b..[..Nz.......|
|
|
00000160 18 27 4f 2e 70 fe 13 96 ba c3 d3 40 16 cd 65 4e |.'O.p......@..eN|
|
|
00000170 ac 11 1e e6 f1 30 09 06 07 2a 86 48 ce 3d 04 01 |.....0...*.H.=..|
|
|
00000180 03 81 8c 00 30 81 88 02 42 00 e0 14 c4 60 60 0b |....0...B....``.|
|
|
00000190 72 68 b0 32 5d 61 4a 02 74 5c c2 81 b9 16 a8 3f |rh.2]aJ.t\.....?|
|
|
000001a0 29 c8 36 c7 81 ff 6c b6 5b d9 70 f1 38 3b 50 48 |).6...l.[.p.8;PH|
|
|
000001b0 28 94 cb 09 1a 52 f1 5d ee 8d f2 b9 f0 f0 da d9 |(....R.]........|
|
|
000001c0 15 3a f9 bd 03 7a 87 a2 23 35 ec 02 42 01 a3 d4 |.:...z..#5..B...|
|
|
000001d0 8a 78 35 1c 4a 9a 23 d2 0a be 2b 10 31 9d 9c 5f |.x5.J.#...+.1.._|
|
|
000001e0 be e8 91 b3 da 1a f5 5d a3 23 f5 26 8b 45 70 8d |.......].#.&.Ep.|
|
|
000001f0 65 62 9b 7e 01 99 3d 18 f6 10 9a 38 61 9b 2e 57 |eb.~..=....8a..W|
|
|
00000200 e4 fa cc b1 8a ce e2 23 a0 87 f0 e1 67 51 eb 16 |.......#....gQ..|
|
|
00000210 03 03 00 86 10 00 00 82 00 80 b9 28 1c 08 59 6e |...........(..Yn|
|
|
00000220 04 5f dd 1d a2 c0 04 d9 ef 2e 9c be ae a4 ce cb |._..............|
|
|
00000230 a3 5e 25 da ec a7 70 95 bb 78 1f 68 37 cc 76 25 |.^%...p..x.h7.v%|
|
|
00000240 14 64 b1 23 35 7e af 93 07 56 41 f2 f7 6b 65 03 |.d.#5~...VA..ke.|
|
|
00000250 98 08 0d dd 0b b3 57 3c 63 09 14 3e 38 7a e8 f6 |......W<c..>8z..|
|
|
00000260 7a 92 3d f4 cc 91 78 a0 90 19 94 a8 1b 60 e5 aa |z.=...x......`..|
|
|
00000270 93 48 44 6c 89 e1 d7 5c 22 20 67 8e 3c 56 ef 7d |.HDl...\" g.<V.}|
|
|
00000280 1b 43 7d c5 d1 06 19 d4 6d 59 d7 36 59 63 e5 08 |.C}.....mY.6Yc..|
|
|
00000290 84 53 51 1e cf a0 d7 fc ec 2a 16 03 03 00 93 0f |.SQ......*......|
|
|
000002a0 00 00 8f 04 03 00 8b 30 81 88 02 42 01 99 ca f5 |.......0...B....|
|
|
000002b0 1d 5f 49 9c 9e 98 df 42 65 dd 3c 6a 50 95 34 94 |._I....Be.<jP.4.|
|
|
000002c0 ff 90 c1 91 89 19 4f 8c 7a a0 f6 9a 30 6d 69 25 |......O.z...0mi%|
|
|
000002d0 d6 73 ce 37 6f 59 cc 84 62 de 48 d9 93 41 1c cb |.s.7oY..b.H..A..|
|
|
000002e0 93 b0 35 c9 01 f2 2b 23 68 62 97 ab 10 4c 02 42 |..5...+#hb...L.B|
|
|
000002f0 00 ba e9 5f ba 91 96 5d 7f d3 a3 f0 c0 29 45 0d |..._...].....)E.|
|
|
00000300 47 64 93 92 96 6f 3a ea a8 48 71 68 0e 67 62 b5 |Gd...o:..Hqh.gb.|
|
|
00000310 61 09 b3 d0 6e 28 8d 43 c8 bc 6e 15 59 91 6c 74 |a...n(.C..n.Y.lt|
|
|
00000320 6c 63 2c 02 dd 3d 40 ce d9 2c 7e 4c f5 92 8c aa |lc,..=@..,~L....|
|
|
00000330 3a b7 14 03 03 00 01 01 16 03 03 00 24 46 dd 87 |:...........$F..|
|
|
00000340 c7 50 96 64 41 11 ad b6 68 cc 90 04 85 21 48 aa |.P.dA...h....!H.|
|
|
00000350 43 da 06 a6 7e ec 73 71 be 37 9a a5 10 1b c7 5c |C...~.sq.7.....\|
|
|
00000360 a7 |.|
|
|
>>> Flow 4 (server to client)
|
|
00000000 14 03 03 00 01 01 16 03 03 00 24 49 19 94 44 b4 |..........$I..D.|
|
|
00000010 e7 50 8a 4f 7a 4f 05 28 e3 bc ae fc e5 ed 1c e0 |.P.OzO.(........|
|
|
00000020 34 0e a7 99 99 08 44 fc 95 5a 91 c9 f4 29 4a 17 |4.....D..Z...)J.|
|
|
00000030 03 03 00 21 5f 7b 31 75 5f 5c 84 a9 c6 5b cf e5 |...!_{1u_\...[..|
|
|
00000040 90 11 a9 64 62 5d cf 54 f2 40 4f fa 1d 52 85 d1 |...db].T.@O..R..|
|
|
00000050 52 5a 2d 7a 18 15 03 03 00 16 4c 68 39 b1 4b 18 |RZ-z......Lh9.K.|
|
|
00000060 9e 67 77 5e 89 1d ae f9 17 fd 16 03 76 12 a6 73 |.gw^........v..s|
|