utls/testdata/Client-TLSv13-ExportKeyingMaterial
Filippo Valsorda 5b79a7c982 crypto/tls: implement TLS 1.3 middlebox compatibility mode
Looks like the introduction of CCS records in the client second flight
gave time to s_server to send NewSessionTicket messages in between the
client application data and close_notify. There seems to be no way of
turning NewSessionTicket messages off, neither by not sending a
psk_key_exchange_modes extension, nor by command line flag.

Interleaving the client write like that tickled an issue akin to #18701:
on Windows, the client reaches Close() before the last record is drained
from the send buffer, the kernel notices and resets the connection,
cutting short the last flow. There is no good way of synchronizing this,
so we sleep for a RTT before calling close, like in CL 75210. Sigh.

Updates #9671

Change-Id: I44dc1cca17b373695b5a18c2741f218af2990bd1
Reviewed-on: https://go-review.googlesource.com/c/147419
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2018-11-12 20:43:06 +00:00

122 lines
9.2 KiB
Text

>>> Flow 1 (client to server)
00000000 16 03 01 00 f8 01 00 00 f4 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 20 00 00 00 00 |........... ....|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 32 cc a8 |.............2..|
00000050 cc a9 c0 2f c0 2b c0 30 c0 2c c0 27 c0 13 c0 23 |.../.+.0.,.'...#|
00000060 c0 09 c0 14 c0 0a 00 9c 00 9d 00 3c 00 2f 00 35 |...........<./.5|
00000070 c0 12 00 0a 00 05 c0 11 c0 07 13 01 13 03 13 02 |................|
00000080 01 00 00 79 00 05 00 05 01 00 00 00 00 00 0a 00 |...y............|
00000090 0a 00 08 00 1d 00 17 00 18 00 19 00 0b 00 02 01 |................|
000000a0 00 00 0d 00 18 00 16 08 04 08 05 08 06 04 01 04 |................|
000000b0 03 05 01 05 03 06 01 06 03 02 01 02 03 ff 01 00 |................|
000000c0 01 00 00 12 00 00 00 2b 00 09 08 03 04 03 03 03 |.......+........|
000000d0 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f e5 7d |....3.&.$... /.}|
000000e0 a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 |.G.bC.(.._.).0..|
000000f0 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |........_X.;t|
>>> Flow 2 (server to client)
00000000 16 03 03 00 7a 02 00 00 76 03 03 da 33 a6 d1 76 |....z...v...3..v|
00000010 5f 72 df d4 59 9b 94 e8 e3 04 a6 c3 f0 58 4d 44 |_r..Y........XMD|
00000020 08 e8 1e 41 c0 25 4c 0c de c0 36 20 00 00 00 00 |...A.%L...6 ....|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 13 01 00 00 |................|
00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 44 |..+.....3.$... D|
00000060 7f a7 d1 f1 38 fa c2 00 dd 48 44 20 b9 32 0b 16 |....8....HD .2..|
00000070 d4 a6 72 da cb c9 23 52 c9 fb b9 b5 2d a0 62 14 |..r...#R....-.b.|
00000080 03 03 00 01 01 17 03 03 00 17 d5 8b b4 47 9e 59 |.............G.Y|
00000090 ff 8b 7e bd 0b 61 97 62 14 78 56 85 a4 45 37 0a |..~..a.b.xV..E7.|
000000a0 fa 17 03 03 02 6d 2d e1 4d 15 4f 8b 0a 55 f4 ed |.....m-.M.O..U..|
000000b0 eb a8 ba e3 ba 65 b2 94 ed ca 94 18 cb e9 31 86 |.....e........1.|
000000c0 38 0a 61 78 e6 19 38 28 7c e6 8e a3 d2 01 4f 16 |8.ax..8(|.....O.|
000000d0 90 ce a9 db 64 e8 ec a1 97 01 04 4a ce dd f2 0f |....d......J....|
000000e0 f8 1c 25 4d 28 d5 07 33 f9 fd c4 f3 f9 26 15 2f |..%M(..3.....&./|
000000f0 66 ef f0 82 49 1b 3d a0 99 ee 27 61 d3 0f 9c d5 |f...I.=...'a....|
00000100 85 3b 49 54 5d 58 7b 0c e2 97 e5 ac b1 10 d5 73 |.;IT]X{........s|
00000110 f8 18 57 2d 7a e2 15 7f a0 e2 07 c1 7a 16 d0 05 |..W-z.......z...|
00000120 df 2e 29 fc c4 59 2a 7c 63 2e 7e e2 b8 75 92 35 |..)..Y*|c.~..u.5|
00000130 f6 92 e4 1e e4 43 dc 25 64 e0 32 9f fe 0a 76 d7 |.....C.%d.2...v.|
00000140 ee 08 f0 e3 e9 02 bc 93 d8 db d2 11 28 df b1 05 |............(...|
00000150 fa fe 70 ef 73 e7 ca f1 a1 e1 95 a1 c6 05 30 0c |..p.s.........0.|
00000160 23 5c 5f d0 77 f0 7e 85 cc 2d 0b 88 41 7a 95 11 |#\_.w.~..-..Az..|
00000170 6b 87 df 6e 5b 4a e4 7a 7a bf 42 f6 d1 fa 8e e5 |k..n[J.zz.B.....|
00000180 96 5f 3b 2e 02 ba c9 f8 40 77 9c ed 81 82 29 2b |._;.....@w....)+|
00000190 8f 97 5e 97 de ff 5f 30 c1 06 66 c7 b4 33 b9 eb |..^..._0..f..3..|
000001a0 ca ee ff 42 db 8e 9c 18 0c 19 0a a4 d0 b7 e2 74 |...B...........t|
000001b0 be d1 6f 79 ea a0 32 44 50 16 86 41 2d d8 4f 5c |..oy..2DP..A-.O\|
000001c0 c1 16 b2 6c a6 5a 49 e9 a1 ff 79 9c b1 23 41 eb |...l.ZI...y..#A.|
000001d0 35 1a a8 f2 21 ff f5 54 a2 92 26 61 f6 53 2c e8 |5...!..T..&a.S,.|
000001e0 c9 4d 1e 42 2b bd de c0 78 f5 9f d0 b4 1e 30 e9 |.M.B+...x.....0.|
000001f0 0a e0 71 50 f6 72 c2 15 1f 93 72 15 c9 3e bc ab |..qP.r....r..>..|
00000200 96 04 e3 5c 4a ee 6f 64 87 b1 ec d4 ca 76 ab 4e |...\J.od.....v.N|
00000210 cf 6e 32 7a 39 15 66 3e e0 67 10 9c 3c 59 d1 31 |.n2z9.f>.g..<Y.1|
00000220 77 21 4c b3 7d 85 82 b6 7d a0 89 5f 08 39 d8 37 |w!L.}...}.._.9.7|
00000230 67 b3 0b b9 eb dd d8 11 ab 8f 9e 7b bb c0 c4 60 |g..........{...`|
00000240 0e 62 31 3b 80 4c fd c5 08 9b 32 b0 0d af b5 1b |.b1;.L....2.....|
00000250 23 9a 18 66 ad 75 85 62 fc da e5 2f 0c 9a 26 d4 |#..f.u.b.../..&.|
00000260 47 26 58 cc 1d 0b 7a e3 f9 a9 52 ac 69 31 73 b6 |G&X...z...R.i1s.|
00000270 31 61 99 6b 38 d7 0d 09 4f 95 72 fc b1 a5 0b 48 |1a.k8...O.r....H|
00000280 f1 66 41 69 e9 4c 33 73 fd 55 32 93 a3 92 55 ee |.fAi.L3s.U2...U.|
00000290 0c aa ef ed 46 70 68 1b 4e 87 32 53 21 fd 5e da |....Fph.N.2S!.^.|
000002a0 0a 27 81 88 46 ba 10 08 f7 7d 43 e0 e5 41 22 8d |.'..F....}C..A".|
000002b0 dd 39 b3 ee 02 7d c7 27 63 7a d0 f1 78 5c cf 56 |.9...}.'cz..x\.V|
000002c0 32 7d 29 2d 90 c7 bc cf fb 44 79 dc c2 03 eb 03 |2})-.....Dy.....|
000002d0 88 7a 57 fc cc 74 de 28 d3 5e 9f f1 1a 50 34 25 |.zW..t.(.^...P4%|
000002e0 34 37 36 94 c6 61 d5 00 c7 da 4d d4 7b 22 9d dc |476..a....M.{"..|
000002f0 ea 4e ff c8 94 4b 4a a6 af a4 fa 81 01 92 cb 08 |.N...KJ.........|
00000300 42 08 6e 7e cc 89 2f de 2e 4d 89 e3 58 48 0d 20 |B.n~../..M..XH. |
00000310 8c 5c 0e 17 03 03 00 99 d0 d0 4f ec e9 40 14 8d |.\........O..@..|
00000320 12 aa c8 dd b9 64 62 02 6c 76 be 3d 97 77 65 36 |.....db.lv.=.we6|
00000330 43 da 7f 60 90 d5 1e 69 bf bb c7 d8 e1 25 54 38 |C..`...i.....%T8|
00000340 44 72 ee c2 fb 3d 07 bc 44 82 74 48 4a c9 c2 28 |Dr...=..D.tHJ..(|
00000350 6e 95 67 85 49 24 99 e6 fb 72 60 84 3a 98 15 21 |n.g.I$...r`.:..!|
00000360 ff fd bc 1b 2e 7d 43 db dc 70 ea 1c 19 67 f6 55 |.....}C..p...g.U|
00000370 52 c5 03 91 4d 0a cb 59 d4 76 b0 53 7b 99 2a a3 |R...M..Y.v.S{.*.|
00000380 60 71 36 55 27 d7 16 bb a4 dc e8 a9 e8 8f e8 a4 |`q6U'...........|
00000390 f6 43 1f 73 d9 b9 65 a9 06 55 e6 0a 17 32 40 34 |.C.s..e..U...2@4|
000003a0 d4 23 7d c1 d2 ae 5d 9e c4 d9 35 22 2c c4 71 cd |.#}...]...5",.q.|
000003b0 e0 17 03 03 00 35 3f 7b f8 cd 3b e4 7b 52 3a ed |.....5?{..;.{R:.|
000003c0 04 2e 80 d1 bc d7 3f 0b 2f 03 98 ee a6 9b 4b fe |......?./.....K.|
000003d0 ff 0c 3b 8d 81 b4 e2 50 d0 07 a4 9c f7 f8 8b 59 |..;....P.......Y|
000003e0 fe 78 e0 21 d7 9b 50 99 df 01 a9 |.x.!..P....|
>>> Flow 3 (client to server)
00000000 14 03 03 00 01 01 17 03 03 00 35 c3 68 6c 59 46 |..........5.hlYF|
00000010 70 ff b5 04 41 bd c5 66 a4 da cd df 04 f8 7e f9 |p...A..f......~.|
00000020 a2 7b 0d f2 e6 cc 0c 30 df a9 66 4d 09 09 dc bf |.{.....0..fM....|
00000030 f4 5c 5e 30 5a 6d 2f bc 48 33 21 2b cb 6a ce f7 |.\^0Zm/.H3!+.j..|
00000040 17 03 03 00 17 9a d0 31 9a c5 c4 4b 59 e3 a4 74 |.......1...KY..t|
00000050 c5 d1 c5 09 a0 5e 08 48 fd 49 df 61 |.....^.H.I.a|
>>> Flow 4 (server to client)
00000000 17 03 03 00 ea c7 4f b3 d0 32 fa 3d 4e e8 58 ea |......O..2.=N.X.|
00000010 d1 8c 9a ed 6d bc 41 ae 22 58 d2 cb 9b 16 4f 45 |....m.A."X....OE|
00000020 91 86 8d 9f 9f 50 be 4d f7 11 c9 ea 20 57 29 f8 |.....P.M.... W).|
00000030 f3 78 8e e3 99 a1 8d 53 52 f0 1d 0a ef 64 cf 19 |.x.....SR....d..|
00000040 9f 6f b7 c3 11 27 07 d6 1a 61 39 75 26 9b 41 a1 |.o...'...a9u&.A.|
00000050 4d a2 a2 cd 59 c5 35 f3 58 ff 52 60 ba 04 54 3c |M...Y.5.X.R`..T<|
00000060 1b 2d 55 81 76 c9 59 af b8 5e 46 4d 09 58 6c 55 |.-U.v.Y..^FM.XlU|
00000070 66 1e d2 f5 7c bb 5e b0 e5 91 19 b0 be 32 04 46 |f...|.^......2.F|
00000080 20 10 f2 75 55 5e 30 96 9d da 37 07 dc df 1d 6f | ..uU^0...7....o|
00000090 c3 f1 d5 b6 db 85 d9 04 d4 13 5b ba 83 20 17 ae |..........[.. ..|
000000a0 68 05 71 d5 72 46 ba 23 ad ab 76 60 68 6a d7 12 |h.q.rF.#..v`hj..|
000000b0 91 55 07 bb b4 2b 40 9f d1 75 6c 36 28 89 89 3d |.U...+@..ul6(..=|
000000c0 9a 73 25 7a 7e 49 56 4c 92 32 74 ad 49 52 a1 09 |.s%z~IVL.2t.IR..|
000000d0 3f 02 62 fe a5 de 80 8c 93 01 de bd 59 5b 95 01 |?.b.........Y[..|
000000e0 f1 62 5f 22 f6 e3 e6 27 ed b7 4b 81 7f 13 13 17 |.b_"...'..K.....|
000000f0 03 03 00 ea 24 b0 f9 84 63 59 2b 30 09 4d 6e 44 |....$...cY+0.MnD|
00000100 13 db 38 db 42 9f 20 7f df f0 73 12 76 0d a5 57 |..8.B. ...s.v..W|
00000110 0c 36 21 7d f6 26 98 66 67 4f 07 8d b0 25 6b 7b |.6!}.&.fgO...%k{|
00000120 7c d7 c0 3d b0 33 8b 87 15 e6 23 6f b5 5a 77 98 ||..=.3....#o.Zw.|
00000130 d8 a7 d2 94 84 2a 7e 05 b2 ba 95 87 1d f5 44 54 |.....*~.......DT|
00000140 33 32 9f 8e df ff 91 77 21 fe db 6e f6 bd 9f 2b |32.....w!..n...+|
00000150 63 43 a9 c4 94 e8 b7 22 ed 6f 03 42 12 95 17 fb |cC.....".o.B....|
00000160 7f 83 ca 8e dd 29 08 52 40 fe 2a aa f1 f2 29 b8 |.....).R@.*...).|
00000170 5e e4 8f b7 67 a5 71 4d 4b 79 cf 5d 5d f2 72 44 |^...g.qMKy.]].rD|
00000180 c2 3e a2 54 18 fc 58 33 d6 4c 2c bd d9 52 08 1f |.>.T..X3.L,..R..|
00000190 3e c3 58 bf 86 80 ad cc 8f 55 a1 b0 fb 96 e6 94 |>.X......U......|
000001a0 43 be a6 14 b0 10 d4 27 38 93 b6 de 1d e1 3e e8 |C......'8.....>.|
000001b0 8a 06 3c 65 49 5a fb 70 4b f7 01 eb 2a ff b0 e0 |..<eIZ.pK...*...|
000001c0 74 ab fe bf a8 fb f8 45 c8 d6 92 f4 0c a3 d3 fb |t......E........|
000001d0 35 32 51 98 04 84 95 75 62 d9 8a 4d 0c b7 |52Q....ub..M..|
>>> Flow 5 (client to server)
00000000 17 03 03 00 13 4b 79 39 94 f7 13 0c 77 5a 78 47 |.....Ky9....wZxG|
00000010 fe e6 e8 41 96 49 84 53 |...A.I.S|