mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-04 04:27: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>
89 lines
6.7 KiB
Text
89 lines
6.7 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 f0 8a 7b f4 40 |....z...v....{.@|
|
|
00000010 4d 58 1d e4 6a 58 d2 e9 dc 28 6b aa bc 2f 60 37 |MX..jX...(k../`7|
|
|
00000020 1c a3 3c ce 7d f2 97 8d ff 14 55 20 00 00 00 00 |..<.}.....U ....|
|
|
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 a4 |..+.....3.$... .|
|
|
00000060 23 1b 72 8e 09 ba fa 75 6c f5 cc c2 2a aa 3d 0f |#.r....ul...*.=.|
|
|
00000070 2e c1 f4 70 40 28 9b df 1e 92 2e cb a2 d5 41 14 |...p@(........A.|
|
|
00000080 03 03 00 01 01 17 03 03 00 17 1f f5 f9 57 54 6a |.............WTj|
|
|
00000090 02 3f 12 97 48 cb e1 df 85 00 58 8d ab 1d 95 55 |.?..H.....X....U|
|
|
000000a0 3f 17 03 03 02 6d 22 f9 23 08 b9 f2 5d 4a f5 9b |?....m".#...]J..|
|
|
000000b0 41 b5 16 33 dc e9 45 34 a8 15 19 0b b0 1e a4 57 |A..3..E4.......W|
|
|
000000c0 46 52 d9 53 ec 3c 7c 5c 6c e0 f4 2e 90 55 cc 74 |FR.S.<|\l....U.t|
|
|
000000d0 65 92 a3 1e f0 75 f0 13 c5 65 42 fb 0a 9d f3 bb |e....u...eB.....|
|
|
000000e0 d5 61 b7 70 74 4d d1 e4 28 f3 8d 0b f5 de 04 fa |.a.ptM..(.......|
|
|
000000f0 46 28 11 b9 d3 50 82 00 97 32 ac ff 19 ce 27 6b |F(...P...2....'k|
|
|
00000100 e9 a9 ae ec c2 49 5a 61 bf a0 c0 57 71 c1 00 76 |.....IZa...Wq..v|
|
|
00000110 e4 81 40 c0 96 81 0a 38 d4 6c b7 7f e3 52 7c 3d |..@....8.l...R|=|
|
|
00000120 bb e1 c8 e0 ef c4 f5 85 8e bc fc d5 5a 00 50 ea |............Z.P.|
|
|
00000130 54 a1 1b da 8c 31 0f 9f bc 13 a2 d1 89 93 8a 08 |T....1..........|
|
|
00000140 47 c5 5e 78 be 09 b5 34 e3 33 d3 38 16 9e 71 ca |G.^x...4.3.8..q.|
|
|
00000150 25 5b 7c 35 08 e6 2c 07 c3 0b 37 60 4a 7b 32 49 |%[|5..,...7`J{2I|
|
|
00000160 9b c4 24 28 6d 76 3e 04 8e 14 22 e9 f9 0d 58 25 |..$(mv>..."...X%|
|
|
00000170 ad 0a 31 8b 1f 0c 2e 50 65 3f 77 fc f9 ab a7 60 |..1....Pe?w....`|
|
|
00000180 6a 52 b0 a9 e5 47 f6 91 b6 72 7a 52 b7 fb c5 93 |jR...G...rzR....|
|
|
00000190 0a 4f 3e 0c 0c 12 5e 30 94 10 5f ee af 4a 40 d0 |.O>...^0.._..J@.|
|
|
000001a0 ba 2c 5b 88 18 86 f1 96 8b cd 28 41 44 59 5e 69 |.,[.......(ADY^i|
|
|
000001b0 be 24 bb 97 99 7e 70 9f 9b d7 bb 54 0b 32 73 bf |.$...~p....T.2s.|
|
|
000001c0 af 71 82 6b b5 21 b6 a0 85 f2 73 56 98 83 60 c0 |.q.k.!....sV..`.|
|
|
000001d0 70 34 c6 1b 7b 40 ee 5d 8e 79 7d bc ac 6b 3c c9 |p4..{@.].y}..k<.|
|
|
000001e0 9c 47 13 d9 08 a9 05 d6 43 38 19 a0 d6 37 e0 48 |.G......C8...7.H|
|
|
000001f0 dd f5 b5 2b e2 d8 25 07 35 5b 20 2f 0e 01 4a 93 |...+..%.5[ /..J.|
|
|
00000200 63 5c 07 b6 3b 7f 62 9a 85 f8 57 0a 69 db 2c 9b |c\..;.b...W.i.,.|
|
|
00000210 11 60 6d f3 2b 31 cc 4e 7d 93 bb 13 39 fd 85 da |.`m.+1.N}...9...|
|
|
00000220 cb 52 84 7e 36 89 28 ef 8f b5 04 c2 37 c3 33 04 |.R.~6.(.....7.3.|
|
|
00000230 ba cb 1b 45 23 2f 2a 49 5d 95 6e 95 d4 32 07 ba |...E#/*I].n..2..|
|
|
00000240 0e 2f 57 0b b2 a5 d9 6b 3e a5 ab f2 97 89 b9 23 |./W....k>......#|
|
|
00000250 5a 3f 11 8d 45 68 3e bc 8a 59 14 36 bc cc 33 b3 |Z?..Eh>..Y.6..3.|
|
|
00000260 50 e3 15 b3 ec 03 ba 52 2f dc 70 5b c0 2a 45 28 |P......R/.p[.*E(|
|
|
00000270 49 2f d0 c7 a1 5c e4 24 35 b0 78 04 fe 87 54 69 |I/...\.$5.x...Ti|
|
|
00000280 c5 6e 56 a7 f5 7f d1 cb 23 af 4a 52 5f 7c 0e 1d |.nV.....#.JR_|..|
|
|
00000290 5a 83 6a 69 f5 bc 99 74 30 ee 3c 05 2b 12 52 09 |Z.ji...t0.<.+.R.|
|
|
000002a0 b0 a2 36 86 14 70 44 dd ec 37 44 4b 8f bf e0 76 |..6..pD..7DK...v|
|
|
000002b0 99 c5 84 90 37 59 a3 e3 f7 57 fa ac bb 6b 04 6a |....7Y...W...k.j|
|
|
000002c0 1e 0f 9f 1d 63 b7 3a 47 48 dc 3b bc ff 4d 47 94 |....c.:GH.;..MG.|
|
|
000002d0 43 38 cb d5 c5 74 bc 6d 0a f3 ea fa 23 ac e5 0b |C8...t.m....#...|
|
|
000002e0 fa b9 61 b1 d9 20 5c c6 c8 32 2e fa 11 f0 99 90 |..a.. \..2......|
|
|
000002f0 d4 96 42 3a b6 09 f3 11 c9 e1 d8 2d ae 80 6a b0 |..B:.......-..j.|
|
|
00000300 21 7a b6 2d d7 37 93 bf 53 ad 82 eb fc f1 8f 21 |!z.-.7..S......!|
|
|
00000310 f0 bc fd 17 03 03 00 99 47 59 11 95 5b 84 48 92 |........GY..[.H.|
|
|
00000320 22 b1 4b b0 70 57 5c b4 67 41 53 ed a7 5b 38 eb |".K.pW\.gAS..[8.|
|
|
00000330 bf 10 65 4a f9 21 c4 63 72 a1 d9 06 f2 21 55 df |..eJ.!.cr....!U.|
|
|
00000340 ff 7e ee ea a3 37 00 f1 14 41 2f 71 b1 8e f1 c0 |.~...7...A/q....|
|
|
00000350 5d 5b 72 4b a5 99 1d 80 c1 e6 94 5d 78 17 46 81 |][rK.......]x.F.|
|
|
00000360 50 1c 6d dc a7 79 60 67 60 ae af fe 6f 84 67 81 |P.m..y`g`...o.g.|
|
|
00000370 bd b5 20 8e 3f 33 28 e4 6a 94 82 37 9d ea 26 71 |.. .?3(.j..7..&q|
|
|
00000380 65 9d 7d a3 c7 32 be ec 3c d0 c6 b5 a6 55 e6 d7 |e.}..2..<....U..|
|
|
00000390 72 49 14 3b 08 41 cb d8 cc d4 52 b5 c8 35 71 79 |rI.;.A....R..5qy|
|
|
000003a0 7d 90 d2 21 0c 61 cb f6 1c 73 0a b0 7d ff 7b 3e |}..!.a...s..}.{>|
|
|
000003b0 44 17 03 03 00 35 c1 39 ac b9 1b 43 33 1e 43 35 |D....5.9...C3.C5|
|
|
000003c0 50 d0 2f b9 f9 cf f9 c3 dd 1c 4c 1e 52 46 bd dc |P./.......L.RF..|
|
|
000003d0 48 93 4f e3 f3 46 27 81 0b 80 34 b4 5b a5 06 c9 |H.O..F'...4.[...|
|
|
000003e0 3c 3a 12 e3 33 45 9d d5 0c 1e 98 |<:..3E.....|
|
|
>>> Flow 3 (client to server)
|
|
00000000 17 03 03 00 35 da 94 f3 ee 16 d5 21 2c be 50 e4 |....5......!,.P.|
|
|
00000010 08 a2 44 90 27 9a 22 44 9f 04 c8 1f 6c 97 57 54 |..D.'."D....l.WT|
|
|
00000020 da 4b 84 f2 f5 7e be 86 2a 19 f3 ed b6 05 e8 30 |.K...~..*......0|
|
|
00000030 a2 ca ee a0 71 bb 75 8d ed fe 17 03 03 00 17 db |....q.u.........|
|
|
00000040 f3 61 60 d9 d2 80 c8 87 17 66 37 b6 e3 a3 27 37 |.a`......f7...'7|
|
|
00000050 c1 91 69 35 60 f6 17 03 03 00 13 e9 c3 a2 1e a4 |..i5`...........|
|
|
00000060 84 65 d3 bb 97 7a 14 1d 4e ae 8b 3f 42 ac |.e...z..N..?B.|
|