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
121 líneas
9.0 KiB
Plaintext
121 líneas
9.0 KiB
Plaintext
>>> Flow 1 (client to server)
|
|
00000000 16 03 01 00 5d 01 00 00 59 03 03 52 ac 77 f8 5a |....]...Y..R.w.Z|
|
|
00000010 89 61 73 8e 24 3b 48 6d 30 b4 36 ee 17 10 58 76 |.as.$;Hm0.6...Xv|
|
|
00000020 d0 48 1d 93 eb 78 c9 ad c0 53 ed 00 00 04 00 05 |.H...x...S......|
|
|
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 01 fb 0b 00 01 f7 00 01 f4 00 01 f1 30 |...............0|
|
|
00000010 82 01 ed 30 82 01 58 a0 03 02 01 02 02 01 00 30 |...0..X........0|
|
|
00000020 0b 06 09 2a 86 48 86 f7 0d 01 01 05 30 26 31 10 |...*.H......0&1.|
|
|
00000030 30 0e 06 03 55 04 0a 13 07 41 63 6d 65 20 43 6f |0...U....Acme Co|
|
|
00000040 31 12 30 10 06 03 55 04 03 13 09 31 32 37 2e 30 |1.0...U....127.0|
|
|
00000050 2e 30 2e 31 30 1e 17 0d 31 31 31 32 30 38 30 37 |.0.10...11120807|
|
|
00000060 35 35 31 32 5a 17 0d 31 32 31 32 30 37 30 38 30 |5512Z..121207080|
|
|
00000070 30 31 32 5a 30 26 31 10 30 0e 06 03 55 04 0a 13 |012Z0&1.0...U...|
|
|
00000080 07 41 63 6d 65 20 43 6f 31 12 30 10 06 03 55 04 |.Acme Co1.0...U.|
|
|
00000090 03 13 09 31 32 37 2e 30 2e 30 2e 31 30 81 9c 30 |...127.0.0.10..0|
|
|
000000a0 0b 06 09 2a 86 48 86 f7 0d 01 01 01 03 81 8c 00 |...*.H..........|
|
|
000000b0 30 81 88 02 81 80 4e d0 7b 31 e3 82 64 d9 59 c0 |0.....N.{1..d.Y.|
|
|
000000c0 c2 87 a4 5e 1e 8b 73 33 c7 63 53 df 66 92 06 84 |...^..s3.cS.f...|
|
|
000000d0 f6 64 d5 8f e4 36 a7 1d 2b e8 b3 20 36 45 23 b5 |.d...6..+.. 6E#.|
|
|
000000e0 e3 95 ae ed e0 f5 20 9c 8d 95 df 7f 5a 12 ef 87 |...... .....Z...|
|
|
000000f0 e4 5b 68 e4 e9 0e 74 ec 04 8a 7f de 93 27 c4 01 |.[h...t......'..|
|
|
00000100 19 7a bd f2 dc 3d 14 ab d0 54 ca 21 0c d0 4d 6e |.z...=...T.!..Mn|
|
|
00000110 87 2e 5c c5 d2 bb 4d 4b 4f ce b6 2c f7 7e 88 ec |..\...MKO..,.~..|
|
|
00000120 7c d7 02 91 74 a6 1e 0c 1a da e3 4a 5a 2e de 13 ||...t......JZ...|
|
|
00000130 9c 4c 40 88 59 93 02 03 01 00 01 a3 32 30 30 30 |.L@.Y.......2000|
|
|
00000140 0e 06 03 55 1d 0f 01 01 ff 04 04 03 02 00 a0 30 |...U...........0|
|
|
00000150 0d 06 03 55 1d 0e 04 06 04 04 01 02 03 04 30 0f |...U..........0.|
|
|
00000160 06 03 55 1d 23 04 08 30 06 80 04 01 02 03 04 30 |..U.#..0.......0|
|
|
00000170 0b 06 09 2a 86 48 86 f7 0d 01 01 05 03 81 81 00 |...*.H..........|
|
|
00000180 36 1f b3 7a 0c 75 c9 6e 37 46 61 2b d5 bd c0 a7 |6..z.u.n7Fa+....|
|
|
00000190 4b cc 46 9a 81 58 7c 85 79 29 c8 c8 c6 67 dd 32 |K.F..X|.y)...g.2|
|
|
000001a0 56 45 2b 75 b6 e9 24 a9 50 9a be 1f 5a fa 1a 15 |VE+u..$.P...Z...|
|
|
000001b0 d9 cc 55 95 72 16 83 b9 c2 b6 8f fd 88 8c 38 84 |..U.r.........8.|
|
|
000001c0 1d ab 5d 92 31 13 4f fd 83 3b c6 9d f1 11 62 b6 |..].1.O..;....b.|
|
|
000001d0 8b ec ab 67 be c8 64 b0 11 50 46 58 17 6b 99 1c |...g..d..PFX.k..|
|
|
000001e0 d3 1d fc 06 f1 0e e5 96 a8 0c f9 78 20 b7 44 18 |...........x .D.|
|
|
000001f0 51 8d 10 7e 4f 94 67 df a3 4e 70 73 8e 90 91 85 |Q..~O.g..Nps....|
|
|
00000200 16 03 03 00 86 10 00 00 82 00 80 05 f0 5b e7 ee |.............[..|
|
|
00000210 1a a0 9d 54 85 3c c9 1d e0 fd d7 21 ed d2 34 0a |...T.<.....!..4.|
|
|
00000220 91 da db 03 b4 c8 b5 50 d9 5f 8e 31 9e 56 ec 62 |.......P._.1.V.b|
|
|
00000230 ff df 79 37 6e 22 c1 11 00 a2 e3 ed 63 29 9e 26 |..y7n"......c).&|
|
|
00000240 4c d1 7a 6a d4 b6 06 cc 06 da 72 a8 4b 08 0b fc |L.zj......r.K...|
|
|
00000250 f4 23 e8 43 9b 9f 55 cc dc 4a e3 45 be b5 be d7 |.#.C..U..J.E....|
|
|
00000260 e5 34 e5 86 ca 45 b4 15 9d 8c bc 0c 66 f2 e5 24 |.4...E......f..$|
|
|
00000270 2c af d8 1a c0 9e dc f7 cc 30 43 d1 1e 8e 4c c0 |,........0C...L.|
|
|
00000280 e8 7b 8e a5 21 37 35 ae b9 c4 aa 16 03 03 00 88 |.{..!75.........|
|
|
00000290 0f 00 00 84 04 01 00 80 2f db 55 56 9a 38 36 98 |......../.UV.86.|
|
|
000002a0 b3 46 cf 9f 91 37 92 98 97 d6 7e 7b 5e b8 cc ef |.F...7....~{^...|
|
|
000002b0 b9 f8 69 91 e4 f5 4a bf 2c 6d f5 b2 d0 61 b3 79 |..i...J.,m...a.y|
|
|
000002c0 f0 6a 22 3c 32 bf 72 c3 7d 4c 30 68 dd d6 cd 53 |.j"<2.r.}L0h...S|
|
|
000002d0 c1 88 84 11 90 7f 75 e2 5b ca 80 a9 c9 8e 6e ef |......u.[.....n.|
|
|
000002e0 87 8b 80 06 c5 ce 95 a5 b5 20 d6 75 04 66 87 29 |......... .u.f.)|
|
|
000002f0 06 1d 59 0b b5 d2 b1 07 5e 09 c3 1d 9e 47 0e 07 |..Y.....^....G..|
|
|
00000300 d9 83 dd 56 e5 93 b6 1e e7 61 5c f8 2b 8a e7 83 |...V.....a\.+...|
|
|
00000310 52 15 2f bd 9c 91 3b a3 14 03 03 00 01 01 16 03 |R./...;.........|
|
|
00000320 03 00 24 64 d6 db a5 d4 0c 9f 03 be c9 f1 20 5c |..$d.......... \|
|
|
00000330 5f 5a 41 1e 5e c9 c6 04 e7 f5 7f 68 db 38 a6 8c |_ZA.^......h.8..|
|
|
00000340 cb 5e b9 99 5e b3 69 |.^..^.i|
|
|
>>> Flow 4 (server to client)
|
|
00000000 14 03 03 00 01 01 16 03 03 00 24 5a 42 72 e0 fc |..........$ZBr..|
|
|
00000010 c7 ca 9c 74 da 0a 85 df d5 32 f4 24 aa e1 45 39 |...t.....2.$..E9|
|
|
00000020 5c 86 29 99 85 c8 1b cb bc ba 1d 27 68 1a a7 17 |\.)........'h...|
|
|
00000030 03 03 00 21 95 56 9f 44 51 a4 51 67 3f ee 8b e4 |...!.V.DQ.Qg?...|
|
|
00000040 19 03 e4 5f 15 aa b7 ce 7f db 15 a0 15 65 e7 cc |..._.........e..|
|
|
00000050 c5 25 72 ae 0c 15 03 03 00 16 e5 97 49 3d f1 5e |.%r.........I=.^|
|
|
00000060 53 4e d9 40 cf 81 de 3b 5f 5e b2 2a 78 51 ab 66 |SN.@...;_^.*xQ.f|
|