utls/testdata/Client-TLSv13-RenegotiationRejected
Filippo Valsorda 2c3ff7ba06 crypto/tls: implement TLS 1.3 client handshake (base)
Implement a basic TLS 1.3 client handshake, only enabled if explicitly
requested with MaxVersion.

This CL intentionally leaves for future CLs:
  - PSK modes and resumption
  - client authentication
  - post-handshake messages
  - downgrade protection
  - KeyLogWriter support

Updates #9671

Change-Id: Ieb6130fb6f25aea4f0d39e3a2448dfc942e1de7a
Reviewed-on: https://go-review.googlesource.com/c/146559
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2018-11-02 22:07:02 +00:00

107 lines
8 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 54 7e 6f 02 63 |....z...v..T~o.c|
00000010 1c ce 10 08 72 06 43 09 69 c1 bb d1 df 5d 05 1f |....r.C.i....]..|
00000020 67 44 47 37 10 75 37 ab 8b dd 58 20 00 00 00 00 |gDG7.u7...X ....|
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 e0 |..+.....3.$... .|
00000060 69 f4 18 18 65 bd a3 f0 ec c5 29 6b 1d 97 53 4c |i...e.....)k..SL|
00000070 84 c0 e1 d7 81 21 66 9d bc 9a e1 b6 62 70 3e 14 |.....!f.....bp>.|
00000080 03 03 00 01 01 17 03 03 00 17 b8 7a b7 13 71 7b |...........z..q{|
00000090 d0 0f fa 58 ae bb b3 1f 2b c9 77 08 94 22 d9 69 |...X....+.w..".i|
000000a0 78 17 03 03 02 6d 80 bb df 32 4b 7f 94 3d f2 34 |x....m...2K..=.4|
000000b0 ea cd 2d fc f1 8f eb 33 39 73 f2 ad 17 20 fa be |..-....39s... ..|
000000c0 99 15 48 91 af fc 01 80 63 e2 05 64 ea 5f 72 9c |..H.....c..d._r.|
000000d0 2c 30 41 ad 62 d2 17 4e eb 10 bb 54 b6 63 08 cb |,0A.b..N...T.c..|
000000e0 3b 2c a7 30 44 ca 78 20 f3 0b 8f 41 cf 3f 32 e8 |;,.0D.x ...A.?2.|
000000f0 e5 b1 a7 2f 0d 04 59 3e 00 85 36 41 17 f8 13 b7 |.../..Y>..6A....|
00000100 92 24 2c 14 49 05 0c fa d7 73 95 10 e6 fb b4 7e |.$,.I....s.....~|
00000110 6e 24 b1 87 cb aa 5e 09 c8 c7 57 16 eb 6d d3 ec |n$....^...W..m..|
00000120 d6 39 c2 ab 3d b8 8e 0e 7e ec 58 3d 0e 9e 81 7f |.9..=...~.X=....|
00000130 2d ad 32 0d d7 18 5f e2 b8 0d d7 59 90 e6 40 49 |-.2..._....Y..@I|
00000140 4f 20 8b fb 9d 94 f9 15 50 0e bb d9 cd ed 9c 7f |O ......P.......|
00000150 88 ce cb b2 60 6a 9d f1 de fa df 43 df 24 c2 15 |....`j.....C.$..|
00000160 64 a0 72 f8 36 fe 38 2d a1 78 58 51 cd 9e df 59 |d.r.6.8-.xXQ...Y|
00000170 5b ea fb d8 e9 31 e2 33 b9 5f fb a6 a2 bb 5f c8 |[....1.3._...._.|
00000180 80 37 16 71 2c 9d d5 98 85 dd 79 ff 82 01 e4 80 |.7.q,.....y.....|
00000190 09 e1 02 22 b2 08 a6 ef bb 05 2b 52 6c 31 08 94 |..."......+Rl1..|
000001a0 f3 31 7a fd b6 f3 b9 8d 19 74 f9 fd 76 6e 4c 29 |.1z......t..vnL)|
000001b0 cf 06 48 e0 4e 85 5d 03 63 97 ef 59 fe 8e 51 2e |..H.N.].c..Y..Q.|
000001c0 2f 68 ad 55 14 b1 56 9b 00 eb 43 2a 03 7e 56 a8 |/h.U..V...C*.~V.|
000001d0 5f 83 6d 4f a2 43 1f 95 2d 8f 6d b3 e2 fb 63 ce |_.mO.C..-.m...c.|
000001e0 de ef e6 e2 0b 3d 7c dd 06 62 38 80 ce a6 88 03 |.....=|..b8.....|
000001f0 3b 39 67 3c 60 ea 4c a4 0b 2d 8a d3 b0 b9 2f 10 |;9g<`.L..-..../.|
00000200 85 5f 30 a5 37 e9 f1 0d 34 f7 a4 c7 15 7b c7 08 |._0.7...4....{..|
00000210 7a 32 8f 52 87 ac 67 c1 c3 f4 1a e0 f3 3a ff ae |z2.R..g......:..|
00000220 85 85 ca d9 4b 4f ad 5f b3 bd 65 98 b4 63 b1 68 |....KO._..e..c.h|
00000230 29 38 39 37 e0 46 01 2f 4d dd 11 94 b0 0e 15 d9 |)897.F./M.......|
00000240 1d c8 a8 ee 4f 72 2d 3c 7b 4a 9b 6a 82 bd f6 78 |....Or-<{J.j...x|
00000250 94 c2 43 e5 6c 14 3f 69 4c dc 6a 7b fa e4 a3 1c |..C.l.?iL.j{....|
00000260 cc 46 75 e3 b2 50 5b 29 50 67 91 ea 45 54 87 42 |.Fu..P[)Pg..ET.B|
00000270 38 99 12 e8 25 86 ab 2b a8 24 72 dc 75 ae d6 bd |8...%..+.$r.u...|
00000280 93 ab fb 75 07 8a 7a 2b 6c 1b 0f 06 6d 9e cd e2 |...u..z+l...m...|
00000290 d4 c6 f0 52 7e 52 59 dd 9b cd 5c d1 77 17 1b d7 |...R~RY...\.w...|
000002a0 1d 03 4f 4e d8 0f b7 7c c7 f8 10 6a 3c 97 4f e3 |..ON...|...j<.O.|
000002b0 e3 2d b3 2a b0 42 c0 ab 9c fd 33 88 b6 8b 60 95 |.-.*.B....3...`.|
000002c0 fb 14 35 28 66 b5 49 1b a3 45 a6 e3 d4 86 ff ec |..5(f.I..E......|
000002d0 6e ad 18 54 60 66 e0 28 89 e8 12 3a ba f6 ab b6 |n..T`f.(...:....|
000002e0 f6 e8 68 3e 2a 2b d7 e0 c8 ed dc 37 9b 1c 94 ef |..h>*+.....7....|
000002f0 c9 91 c7 c6 47 13 4a c7 bf fc 44 9a 41 94 73 61 |....G.J...D.A.sa|
00000300 b2 ca 6a a1 cf 0a 65 c9 79 be 2a 8f 00 b7 99 98 |..j...e.y.*.....|
00000310 03 03 20 17 03 03 00 99 50 46 40 7e 04 bd 9f ec |.. .....PF@~....|
00000320 82 d2 f7 72 a0 00 aa 7c 9b 59 b7 a1 14 81 98 8e |...r...|.Y......|
00000330 18 58 c5 7c e2 96 7d 79 24 41 ad f1 51 1f d9 8a |.X.|..}y$A..Q...|
00000340 25 3c d0 f0 c0 77 82 1c 76 0c f0 f0 f4 2e c7 1a |%<...w..v.......|
00000350 dd 81 84 77 b5 9a 5c 78 02 7f db bb 2c d4 8e 7f |...w..\x....,...|
00000360 63 c2 86 de 43 01 c1 3c 35 28 d0 91 f0 bc ec 83 |c...C..<5(......|
00000370 dd b7 a4 91 b2 c5 1e e4 b7 da fd 0a df f7 33 b0 |..............3.|
00000380 37 39 1b 0c 01 00 1f df 1d c5 44 fc 5b 84 53 22 |79........D.[.S"|
00000390 21 1d 02 49 97 c7 08 dc 4a 28 cc 6f fc 5e 9c d5 |!..I....J(.o.^..|
000003a0 cf ea 11 89 f5 5f 15 25 e6 f7 bf a9 b4 c1 bb 91 |....._.%........|
000003b0 5d 17 03 03 00 35 23 b8 53 0a 97 0f e7 6c 01 5c |]....5#.S....l.\|
000003c0 5e 22 2e 14 ab 33 6d 87 3f 99 41 35 50 c4 95 76 |^"...3m.?.A5P..v|
000003d0 ea ac 8d d4 01 10 55 0a 74 c3 8a 80 64 44 cc 7c |......U.t...dD.||
000003e0 d0 59 a5 34 dd c7 b9 13 ff 54 55 |.Y.4.....TU|
>>> Flow 3 (client to server)
00000000 17 03 03 00 35 c9 d1 1c 82 c8 d6 03 be 95 47 78 |....5.........Gx|
00000010 4d 0e 3a 7c fb 60 55 5f 41 5c dd 63 47 41 ff 43 |M.:|.`U_A\.cGA.C|
00000020 c9 4b 1c 37 bc be ac 2a f6 2c d7 39 06 58 5d 71 |.K.7...*.,.9.X]q|
00000030 ab 71 6a 5d 3c 52 c6 f1 48 ee 17 03 03 00 17 d6 |.qj]<R..H.......|
00000040 b0 41 b8 01 ce 8e 3e e4 45 bf db 7e 58 49 77 09 |.A....>.E..~XIw.|
00000050 50 e4 a2 35 35 67 |P..55g|
>>> Flow 4 (server to client)
00000000 17 03 03 00 da 01 9d a9 a7 3b 74 8a d3 cb 20 49 |.........;t... I|
00000010 b1 73 82 ca 35 bb d7 6b 0d 0d 29 c2 6b 3c 63 75 |.s..5..k..).k<cu|
00000020 e2 40 11 fb 2a 03 9b dd 28 01 f1 ed b4 18 d0 dd |.@..*...(.......|
00000030 6e 86 02 4b 8d a8 00 73 8e 53 38 df 79 a6 8b 4b |n..K...s.S8.y..K|
00000040 3e fd 73 17 20 14 ed 6c 9e 5d 6d 5d 0f 30 28 a2 |>.s. ..l.]m].0(.|
00000050 f1 37 92 e8 f7 f7 db 16 82 0e 01 60 9c 88 c4 18 |.7.........`....|
00000060 d5 e7 b2 7c 3e ba e5 df 40 12 77 83 2c c8 0a 59 |...|>...@.w.,..Y|
00000070 a1 cc 43 17 c5 3d 77 76 39 07 ea 4a 37 10 dd d2 |..C..=wv9..J7...|
00000080 cc a5 70 3b d6 d1 41 c6 67 1c 16 61 e3 32 f7 a0 |..p;..A.g..a.2..|
00000090 21 76 4d 3f c0 6a 9d 82 e8 0f b4 44 07 a4 c7 74 |!vM?.j.....D...t|
000000a0 e4 38 be d8 7d 61 f7 cc dc 61 0f 3b 81 f0 b7 4d |.8..}a...a.;...M|
000000b0 7c ac 85 0c 2b 93 6c 02 a4 76 c5 fe f2 c2 d6 81 ||...+.l..v......|
000000c0 18 9b f4 11 ae 8c e6 c4 7a 91 d2 f7 84 43 fc 22 |........z....C."|
000000d0 a1 85 90 cb 20 07 2e 91 87 e9 65 a1 2f 1f 5b |.... .....e./.[|
>>> Flow 5 (client to server)
00000000 17 03 03 00 13 6f bd 84 f6 9b 45 bc 84 ba 22 b0 |.....o....E...".|
00000010 ae 0f cf 02 fa f7 4e 15 17 03 03 00 13 c1 b9 70 |......N........p|
00000020 e4 13 f9 b1 dc 1c d6 6e 7f ca 2b 1e d5 ab 0f 9c |.......n..+.....|