mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
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>
92 lines
6.9 KiB
Text
92 lines
6.9 KiB
Text
>>> Flow 1 (client to server)
|
|
00000000 16 03 01 01 10 01 00 01 0c 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 91 33 74 00 00 00 05 00 05 01 00 00 00 |....3t..........|
|
|
00000090 00 00 0a 00 0a 00 08 00 1d 00 17 00 18 00 19 00 |................|
|
|
000000a0 0b 00 02 01 00 00 0d 00 18 00 16 08 04 08 05 08 |................|
|
|
000000b0 06 04 01 04 03 05 01 05 03 06 01 06 03 02 01 02 |................|
|
|
000000c0 03 ff 01 00 01 00 00 10 00 10 00 0e 06 70 72 6f |.............pro|
|
|
000000d0 74 6f 32 06 70 72 6f 74 6f 31 00 12 00 00 00 2b |to2.proto1.....+|
|
|
000000e0 00 09 08 03 04 03 03 03 02 03 01 00 33 00 26 00 |............3.&.|
|
|
000000f0 24 00 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da |$... /.}.G.bC.(.|
|
|
00000100 ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 |._.).0..........|
|
|
00000110 5f 58 cb 3b 74 |_X.;t|
|
|
>>> Flow 2 (server to client)
|
|
00000000 16 03 03 00 7a 02 00 00 76 03 03 0a 4d aa 31 08 |....z...v...M.1.|
|
|
00000010 a9 02 77 7b 6e 39 6d cd dc 26 a1 21 15 64 b4 a8 |..w{n9m..&.!.d..|
|
|
00000020 c5 61 98 3c 41 c0 20 1a 58 0e 15 20 00 00 00 00 |.a.<A. .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 f9 |..+.....3.$... .|
|
|
00000060 8d 85 0e 95 63 58 e1 f2 bb c9 3b fe 19 72 01 f0 |....cX....;..r..|
|
|
00000070 8c 16 7a f3 ab ed d0 d3 8d b3 30 24 db f0 34 14 |..z.......0$..4.|
|
|
00000080 03 03 00 01 01 17 03 03 00 24 dc 0d 5f ee de 81 |.........$.._...|
|
|
00000090 49 b6 e1 fb 6b 4d 78 fd 9b c5 95 06 a4 6e c2 d9 |I...kMx......n..|
|
|
000000a0 e5 12 9e ab 6e fe e7 e3 fb bc 92 9e d0 50 17 03 |....n........P..|
|
|
000000b0 03 02 6d 7a 58 09 43 b9 12 57 77 eb 47 02 78 a3 |..mzX.C..Ww.G.x.|
|
|
000000c0 b3 f8 1e 58 c2 27 8d d8 44 40 49 3d a3 d9 70 1c |...X.'..D@I=..p.|
|
|
000000d0 6f b0 51 97 87 20 a0 9c 7d 05 10 d9 35 b7 5f 31 |o.Q.. ..}...5._1|
|
|
000000e0 cb 18 87 82 a8 03 be c8 e0 a9 5b 59 a2 98 c4 0e |..........[Y....|
|
|
000000f0 03 77 c9 06 77 a7 96 aa 3f 72 10 62 5c 5f f0 13 |.w..w...?r.b\_..|
|
|
00000100 c6 a4 53 48 6a b5 2f 9d c3 50 cc 9d a2 a4 53 6a |..SHj./..P....Sj|
|
|
00000110 a9 ac e1 82 b6 6f 1a 60 15 3f 23 0d 45 ac 12 5a |.....o.`.?#.E..Z|
|
|
00000120 26 e4 16 87 48 8c 64 25 f2 f5 41 b7 26 ac 52 6d |&...H.d%..A.&.Rm|
|
|
00000130 f5 83 bf d1 3d 12 3d b0 2f 36 87 c8 e9 04 e8 69 |....=.=./6.....i|
|
|
00000140 5c 6b 60 a0 e0 0a ff f0 ae eb 42 b3 09 dd cd 1e |\k`.......B.....|
|
|
00000150 5d 00 d8 23 fb 4f cf fb 15 57 ac d6 e8 16 f4 8d |]..#.O...W......|
|
|
00000160 02 2d 3b d5 7c 9f 7c b4 33 5c 77 32 74 5c 18 90 |.-;.|.|.3\w2t\..|
|
|
00000170 d8 5f f6 5b c5 ac 73 c0 48 ab e9 88 95 7a d4 67 |._.[..s.H....z.g|
|
|
00000180 6f 13 3d 63 26 35 d1 7d 3b 4e fd 27 7f ac d2 bb |o.=c&5.};N.'....|
|
|
00000190 4a 57 f4 55 b5 93 aa ff cb a7 51 4c 20 07 d5 a6 |JW.U......QL ...|
|
|
000001a0 4a 05 e2 b7 c2 ac b9 25 0f de 42 a7 0e 4d b6 b8 |J......%..B..M..|
|
|
000001b0 e6 3d b0 ba 9d bf 13 51 43 31 3e f2 51 d5 28 a7 |.=.....QC1>.Q.(.|
|
|
000001c0 62 81 2d 8e 4c 86 2f e2 8a 87 79 bc 43 89 ce af |b.-.L./...y.C...|
|
|
000001d0 f5 08 4e 36 4f 0b 17 cf a3 05 a7 27 7c 21 2c 18 |..N6O......'|!,.|
|
|
000001e0 a0 51 f8 ef 38 de 80 99 54 bb 16 2d d2 65 76 95 |.Q..8...T..-.ev.|
|
|
000001f0 91 7b 81 36 ed 43 5e 44 f5 d5 6d 74 37 37 56 cb |.{.6.C^D..mt77V.|
|
|
00000200 7d 79 7b 7c 96 42 ba 74 8f 5c 6c aa 3d e4 57 90 |}y{|.B.t.\l.=.W.|
|
|
00000210 07 a7 d1 50 7e 16 54 ec 92 a6 e4 e2 6f cf 10 c7 |...P~.T.....o...|
|
|
00000220 1e 6f 24 4c 1a 5d 44 72 0f 10 22 2f 04 aa ca 55 |.o$L.]Dr.."/...U|
|
|
00000230 c6 d0 54 45 80 6d 87 ed 85 44 64 07 c5 71 ff 68 |..TE.m...Dd..q.h|
|
|
00000240 ae c5 f1 5c 8d 8a 4d 85 3b 68 65 b2 97 c7 2b bf |...\..M.;he...+.|
|
|
00000250 49 d8 76 ac 58 de ba 31 7f 10 92 85 4c cd f5 d7 |I.v.X..1....L...|
|
|
00000260 bc db aa f4 c8 81 95 fd 77 e8 9f 03 74 0e 15 a7 |........w...t...|
|
|
00000270 73 0c 6d 07 27 ce c3 23 cc 68 f0 82 ce 2b 8d 25 |s.m.'..#.h...+.%|
|
|
00000280 4e b3 e8 31 b6 e4 2b 4e bf b8 09 f7 ef 6e 64 89 |N..1..+N.....nd.|
|
|
00000290 23 03 03 bf 93 dd 3a 89 e1 cf d1 7b b8 72 8d 40 |#.....:....{.r.@|
|
|
000002a0 30 d4 06 be c4 78 a7 70 66 a5 90 36 86 e4 a1 53 |0....x.pf..6...S|
|
|
000002b0 59 81 68 04 bc 1b 5b b8 28 ff d0 78 75 2a 46 a7 |Y.h...[.(..xu*F.|
|
|
000002c0 3b 11 08 e3 cc fd 39 a4 d0 fa d0 ed cf 34 ce 6e |;.....9......4.n|
|
|
000002d0 02 a6 6c 1c 04 c3 a7 53 08 6c dc 8c 71 51 7c 9c |..l....S.l..qQ|.|
|
|
000002e0 f0 da 86 91 a0 f1 0d 04 fb 18 c3 89 1a b8 58 f7 |..............X.|
|
|
000002f0 50 9c cb 62 a6 d4 64 6b cd 7b 5c 33 1e d8 45 43 |P..b..dk.{\3..EC|
|
|
00000300 f6 72 cd 04 1a 7f e4 48 b2 16 17 9d 79 97 5c bc |.r.....H....y.\.|
|
|
00000310 fa 0a 06 b1 92 f1 b3 db 98 83 04 01 6a 2b 51 38 |............j+Q8|
|
|
00000320 17 03 03 00 99 82 ea 5b 85 f2 b1 05 63 fa 98 d3 |.......[....c...|
|
|
00000330 ad 0d ac ab 0a a2 95 81 1a 04 52 c0 9e 18 da 3d |..........R....=|
|
|
00000340 b6 36 a6 6f 35 1d c2 e0 e6 82 d6 0d ec b4 e1 02 |.6.o5...........|
|
|
00000350 95 43 e0 1e 3c 2b 96 8f 39 d0 49 33 ef 30 4f 05 |.C..<+..9.I3.0O.|
|
|
00000360 7a 2e 1b 04 39 d7 b3 4a 1a 24 20 11 1e d7 fb ea |z...9..J.$ .....|
|
|
00000370 28 57 68 79 53 7d f8 08 35 c4 c2 7a f5 73 19 76 |(WhyS}..5..z.s.v|
|
|
00000380 dc 56 fb 35 aa 6a b7 73 7b da 41 f3 9f 71 14 14 |.V.5.j.s{.A..q..|
|
|
00000390 b8 61 8e ab 82 5e 57 e8 af d2 31 95 ec 4f a7 01 |.a...^W...1..O..|
|
|
000003a0 f2 2b cc 75 1b b1 cd c6 25 c0 69 32 4d 02 53 73 |.+.u....%.i2M.Ss|
|
|
000003b0 80 ef c3 af 62 68 a7 82 15 dc e5 f2 8e 0f 17 03 |....bh..........|
|
|
000003c0 03 00 35 ca d4 d7 83 55 19 de 32 ec b2 9c 79 13 |..5....U..2...y.|
|
|
000003d0 e2 99 3b ae 9d 90 d1 ec 76 e9 89 be b0 59 9b e1 |..;.....v....Y..|
|
|
000003e0 fc 37 a7 84 5c 3c 03 e2 92 72 f9 ee d6 85 fc 42 |.7..\<...r.....B|
|
|
000003f0 f2 2f f6 ac bb 2b 25 a0 |./...+%.|
|
|
>>> Flow 3 (client to server)
|
|
00000000 17 03 03 00 35 cc 3b 0d 48 9a 16 49 7c 30 93 a1 |....5.;.H..I|0..|
|
|
00000010 ad ad f3 1d 8c ba 5b 16 af bd 40 36 31 0c aa 64 |......[...@61..d|
|
|
00000020 0c b0 2b bd d2 24 6e e8 07 30 94 e2 22 c8 c4 b8 |..+..$n..0.."...|
|
|
00000030 3c 7a 36 f6 dd 4c be 4c ef 68 17 03 03 00 17 f6 |<z6..L.L.h......|
|
|
00000040 d1 ea 13 82 3e 34 42 2c b9 33 d7 7f f6 cc 16 96 |....>4B,.3......|
|
|
00000050 b5 32 fd a4 5c f1 17 03 03 00 13 d6 00 df 9b 19 |.2..\...........|
|
|
00000060 38 a4 5e 5a 95 53 b6 10 80 79 1a 31 6b 4d |8.^Z.S...y.1kM|
|