mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-04 04:27:36 +03:00
Support for Ed25519 certificates was added in CL 175478, this wires them up into the TLS stack according to RFC 8422 (TLS 1.2) and RFC 8446 (TLS 1.3). RFC 8422 also specifies support for TLS 1.0 and 1.1, and I initially implemented that, but even OpenSSL doesn't take the complexity, so I just dropped it. It would have required keeping a buffer of the handshake transcript in order to do the direct Ed25519 signatures. We effectively need to support TLS 1.2 because it shares ClientHello signature algorithms with TLS 1.3. While at it, reordered the advertised signature algorithms in the rough order we would want to use them, also based on what curves have fast constant-time implementations. Client and client auth tests changed because of the change in advertised signature algorithms in ClientHello and CertificateRequest. Fixes #25355 Change-Id: I9fdd839afde4fd6b13fcbc5cc7017fd8c35085ee Reviewed-on: https://go-review.googlesource.com/c/go/+/177698 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
138 lines
10 KiB
Text
138 lines
10 KiB
Text
>>> Flow 1 (client to server)
|
|
00000000 16 03 01 00 fa 01 00 00 f6 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 7b 00 05 00 05 01 00 00 00 00 00 0a 00 |...{............|
|
|
00000090 0a 00 08 00 1d 00 17 00 18 00 19 00 0b 00 02 01 |................|
|
|
000000a0 00 00 0d 00 1a 00 18 08 04 04 03 08 07 08 05 08 |................|
|
|
000000b0 06 04 01 05 01 06 01 05 03 06 03 02 01 02 03 ff |................|
|
|
000000c0 01 00 01 00 00 12 00 00 00 2b 00 09 08 03 04 03 |.........+......|
|
|
000000d0 03 03 02 03 01 00 33 00 26 00 24 00 1d 00 20 2f |......3.&.$... /|
|
|
000000e0 e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 30 |.}.G.bC.(.._.).0|
|
|
000000f0 ff f6 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 59 02 00 00 55 03 03 61 3f 7c 9a 87 |....Y...U..a?|..|
|
|
00000010 de 3b 63 d2 7e 08 97 8a 84 d1 78 f0 25 0e d6 cd |.;c.~.....x.%...|
|
|
00000020 a0 e0 0c 90 e2 63 70 54 5b 3b 11 20 ef dc d6 32 |.....cpT[;. ...2|
|
|
00000030 f4 4f 37 07 e9 75 89 a1 2f 8b ca 8a dd 5c 3d 6c |.O7..u../....\=l|
|
|
00000040 9c 8b 89 07 38 ac d2 7e ab 98 b9 e5 c0 09 00 00 |....8..~........|
|
|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
|
|
00000060 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 |.............0..|
|
|
00000070 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 |.0..b.....-G....|
|
|
00000080 30 09 06 07 2a 86 48 ce 3d 04 01 30 45 31 0b 30 |0...*.H.=..0E1.0|
|
|
00000090 09 06 03 55 04 06 13 02 41 55 31 13 30 11 06 03 |...U....AU1.0...|
|
|
000000a0 55 04 08 13 0a 53 6f 6d 65 2d 53 74 61 74 65 31 |U....Some-State1|
|
|
000000b0 21 30 1f 06 03 55 04 0a 13 18 49 6e 74 65 72 6e |!0...U....Intern|
|
|
000000c0 65 74 20 57 69 64 67 69 74 73 20 50 74 79 20 4c |et Widgits Pty L|
|
|
000000d0 74 64 30 1e 17 0d 31 32 31 31 32 32 31 35 30 36 |td0...1211221506|
|
|
000000e0 33 32 5a 17 0d 32 32 31 31 32 30 31 35 30 36 33 |32Z..22112015063|
|
|
000000f0 32 5a 30 45 31 0b 30 09 06 03 55 04 06 13 02 41 |2Z0E1.0...U....A|
|
|
00000100 55 31 13 30 11 06 03 55 04 08 13 0a 53 6f 6d 65 |U1.0...U....Some|
|
|
00000110 2d 53 74 61 74 65 31 21 30 1f 06 03 55 04 0a 13 |-State1!0...U...|
|
|
00000120 18 49 6e 74 65 72 6e 65 74 20 57 69 64 67 69 74 |.Internet Widgit|
|
|
00000130 73 20 50 74 79 20 4c 74 64 30 81 9b 30 10 06 07 |s Pty Ltd0..0...|
|
|
00000140 2a 86 48 ce 3d 02 01 06 05 2b 81 04 00 23 03 81 |*.H.=....+...#..|
|
|
00000150 86 00 04 00 c4 a1 ed be 98 f9 0b 48 73 36 7e c3 |...........Hs6~.|
|
|
00000160 16 56 11 22 f2 3d 53 c3 3b 4d 21 3d cd 6b 75 e6 |.V.".=S.;M!=.ku.|
|
|
00000170 f6 b0 dc 9a df 26 c1 bc b2 87 f0 72 32 7c b3 64 |.....&.....r2|.d|
|
|
00000180 2f 1c 90 bc ea 68 23 10 7e fe e3 25 c0 48 3a 69 |/....h#.~..%.H:i|
|
|
00000190 e0 28 6d d3 37 00 ef 04 62 dd 0d a0 9c 70 62 83 |.(m.7...b....pb.|
|
|
000001a0 d8 81 d3 64 31 aa 9e 97 31 bd 96 b0 68 c0 9b 23 |...d1...1...h..#|
|
|
000001b0 de 76 64 3f 1a 5c 7f e9 12 0e 58 58 b6 5f 70 dd |.vd?.\....XX._p.|
|
|
000001c0 9b d8 ea d5 d7 f5 d5 cc b9 b6 9f 30 66 5b 66 9a |...........0f[f.|
|
|
000001d0 20 e2 27 e5 bf fe 3b 30 09 06 07 2a 86 48 ce 3d | .'...;0...*.H.=|
|
|
000001e0 04 01 03 81 8c 00 30 81 88 02 42 01 88 a2 4f eb |......0...B...O.|
|
|
000001f0 e2 45 c5 48 7d 1b ac f5 ed 98 9d ae 47 70 c0 5e |.E.H}.......Gp.^|
|
|
00000200 1b b6 2f bd f1 b6 4d b7 61 40 d3 11 a2 ce ee 0b |../...M.a@......|
|
|
00000210 7e 92 7e ff 76 9d c3 3b 7e a5 3f ce fa 10 e2 59 |~.~.v..;~.?....Y|
|
|
00000220 ec 47 2d 7c ac da 4e 97 0e 15 a0 6f d0 02 42 01 |.G-|..N....o..B.|
|
|
00000230 4d fc be 67 13 9c 2d 05 0e bd 3f a3 8c 25 c1 33 |M..g..-...?..%.3|
|
|
00000240 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd |.......7z..z....|
|
|
00000250 d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d |..i..|V..1x+..x.|
|
|
00000260 ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f |....N6$1{j.9....|
|
|
00000270 2a 16 03 03 00 b7 0c 00 00 b3 03 00 1d 20 9e 1c |*............ ..|
|
|
00000280 a9 0f 8a 83 fb 33 a7 a4 0e 75 9a 96 ba 14 59 26 |.....3...u....Y&|
|
|
00000290 48 ad 94 ad 79 d0 81 f1 b6 39 eb c8 6b 45 04 03 |H...y....9..kE..|
|
|
000002a0 00 8b 30 81 88 02 42 01 49 b1 7a 06 09 c7 41 16 |..0...B.I.z...A.|
|
|
000002b0 65 2f 0b 89 47 2e 53 10 0a 9e 18 c4 c6 39 f8 74 |e/..G.S......9.t|
|
|
000002c0 79 49 e8 45 76 88 78 d7 2b 93 61 4a 78 93 e4 32 |yI.Ev.x.+.aJx..2|
|
|
000002d0 74 57 5f 77 d6 65 de b6 13 50 d5 06 43 40 c3 98 |tW_w.e...P..C@..|
|
|
000002e0 87 7a 8b 90 54 3d 62 fa 7e 02 42 00 aa 6c 3b 6b |.z..T=b.~.B..l;k|
|
|
000002f0 3f 15 1d 23 ef 50 bf 09 18 65 4b b0 5f 67 ba d9 |?..#.P...eK._g..|
|
|
00000300 c7 dd 1d 26 30 9c 5b 14 50 61 93 da e0 8f 77 82 |...&0.[.Pa....w.|
|
|
00000310 43 6b d0 81 75 96 ac 0e 24 96 54 bf e2 22 a9 4e |Ck..u...$.T..".N|
|
|
00000320 90 07 de 61 86 f0 a4 09 59 5e d3 e5 3d 16 03 03 |...a....Y^..=...|
|
|
00000330 00 3a 0d 00 00 36 03 01 02 40 00 2e 04 03 05 03 |.:...6...@......|
|
|
00000340 06 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 |................|
|
|
00000350 08 06 04 01 05 01 06 01 03 03 02 03 03 01 02 01 |................|
|
|
00000360 03 02 02 02 04 02 05 02 06 02 00 00 16 03 03 00 |................|
|
|
00000370 04 0e 00 00 00 |.....|
|
|
>>> Flow 3 (client to server)
|
|
00000000 16 03 03 01 fd 0b 00 01 f9 00 01 f6 00 01 f3 30 |...............0|
|
|
00000010 82 01 ef 30 82 01 58 a0 03 02 01 02 02 10 5c 19 |...0..X.......\.|
|
|
00000020 c1 89 65 83 55 6f dc 0b c9 b9 93 9f e9 bc 30 0d |..e.Uo........0.|
|
|
00000030 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 12 31 |..*.H........0.1|
|
|
00000040 10 30 0e 06 03 55 04 0a 13 07 41 63 6d 65 20 43 |.0...U....Acme C|
|
|
00000050 6f 30 1e 17 0d 31 36 30 38 31 37 32 31 35 32 33 |o0...16081721523|
|
|
00000060 31 5a 17 0d 31 37 30 38 31 37 32 31 35 32 33 31 |1Z..170817215231|
|
|
00000070 5a 30 12 31 10 30 0e 06 03 55 04 0a 13 07 41 63 |Z0.1.0...U....Ac|
|
|
00000080 6d 65 20 43 6f 30 81 9f 30 0d 06 09 2a 86 48 86 |me Co0..0...*.H.|
|
|
00000090 f7 0d 01 01 01 05 00 03 81 8d 00 30 81 89 02 81 |...........0....|
|
|
000000a0 81 00 ba 6f aa 86 bd cf bf 9f f2 ef 5c 94 60 78 |...o........\.`x|
|
|
000000b0 6f e8 13 f2 d1 96 6f cd d9 32 6e 22 37 ce 41 f9 |o.....o..2n"7.A.|
|
|
000000c0 ca 5d 29 ac e1 27 da 61 a2 ee 81 cb 10 c7 df 34 |.])..'.a.......4|
|
|
000000d0 58 95 86 e9 3d 19 e6 5c 27 73 60 c8 8d 78 02 f4 |X...=..\'s`..x..|
|
|
000000e0 1d a4 98 09 a3 19 70 69 3c 25 62 66 2a ab 22 23 |......pi<%bf*."#|
|
|
000000f0 c5 7b 85 38 4f 2e 09 73 32 a7 bd 3e 9b ad ca 84 |.{.8O..s2..>....|
|
|
00000100 07 e6 0f 3a ff 77 c5 9d 41 85 00 8a b6 9b ee b0 |...:.w..A.......|
|
|
00000110 a4 3f 2d 4c 4c e6 42 3e bb 51 c8 dd 48 54 f4 0c |.?-LL.B>.Q..HT..|
|
|
00000120 8e 47 02 03 01 00 01 a3 46 30 44 30 0e 06 03 55 |.G......F0D0...U|
|
|
00000130 1d 0f 01 01 ff 04 04 03 02 05 a0 30 13 06 03 55 |...........0...U|
|
|
00000140 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03 01 |.%..0...+.......|
|
|
00000150 30 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0f |0...U.......0.0.|
|
|
00000160 06 03 55 1d 11 04 08 30 06 87 04 7f 00 00 01 30 |..U....0.......0|
|
|
00000170 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 03 81 |...*.H..........|
|
|
00000180 81 00 46 ab 44 a2 fb 28 54 f8 5a 67 f8 62 94 f1 |..F.D..(T.Zg.b..|
|
|
00000190 9a b2 18 9e f2 b1 de 1d 7e 6f 76 95 a9 ba e7 5d |........~ov....]|
|
|
000001a0 a8 16 6c 9c f7 09 d3 37 e4 4b 2b 36 7c 01 ad 41 |..l....7.K+6|..A|
|
|
000001b0 d2 32 d8 c3 d2 93 f9 10 6b 8e 95 b9 2c 17 8a a3 |.2......k...,...|
|
|
000001c0 44 48 bc 59 13 83 16 04 88 a4 81 5c 25 0d 98 0c |DH.Y.......\%...|
|
|
000001d0 ac 11 b1 28 56 be 1d cd 61 62 84 09 bf d6 80 c6 |...(V...ab......|
|
|
000001e0 45 8d 82 2c b4 d8 83 9b db c9 22 b7 2a 12 11 7b |E..,......".*..{|
|
|
000001f0 fa 02 3b c1 c9 ff ea c9 9d a8 49 d3 95 d7 d5 0e |..;.......I.....|
|
|
00000200 e5 35 16 03 03 00 25 10 00 00 21 20 2f e5 7d a3 |.5....%...! /.}.|
|
|
00000210 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...|
|
|
00000220 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 16 03 03 00 |......._X.;t....|
|
|
00000230 88 0f 00 00 84 08 04 00 80 1f 32 e0 7a 18 d4 63 |..........2.z..c|
|
|
00000240 9b a3 30 16 57 2d 0e 13 78 b6 a9 07 90 04 34 7d |..0.W-..x.....4}|
|
|
00000250 2d e8 db b6 bb 95 07 80 6c 4b 59 d7 47 34 b2 d5 |-.......lKY.G4..|
|
|
00000260 3a 91 87 80 a4 7d bb 9f f2 dc dc 9e 7c cb cc 53 |:....}......|..S|
|
|
00000270 b2 46 60 3e 27 ab 46 94 03 d2 a8 f6 b3 66 81 b8 |.F`>'.F......f..|
|
|
00000280 13 2d e2 78 c7 1c ad 51 05 77 79 c1 87 b4 0d 1d |.-.x...Q.wy.....|
|
|
00000290 95 8d 3f 4d a2 61 94 f8 bf 30 84 b4 42 6e 42 b0 |..?M.a...0..BnB.|
|
|
000002a0 aa 73 57 65 86 1e b2 af c8 4b 03 84 1e 2a 3a f4 |.sWe.....K...*:.|
|
|
000002b0 6e 45 73 9e 65 0a ca 3f 8a 14 03 03 00 01 01 16 |nEs.e..?........|
|
|
000002c0 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 00 |...@............|
|
|
000002d0 00 00 00 00 ae b6 dd 09 5d ec ff 1c 09 88 eb a4 |........].......|
|
|
000002e0 be c2 76 48 0c f0 7b 6f 50 f8 52 f9 81 97 28 aa |..vH..{oP.R...(.|
|
|
000002f0 31 31 91 ea 98 80 50 55 e0 71 9b 82 9b e8 48 ec |11....PU.q....H.|
|
|
00000300 3d 45 c3 f2 |=E..|
|
|
>>> Flow 4 (server to client)
|
|
00000000 14 03 03 00 01 01 16 03 03 00 40 ca 5e 0f 47 25 |..........@.^.G%|
|
|
00000010 5c a6 64 4d 90 74 ba d2 0b e8 df 3b cf 43 9a a7 |\.dM.t.....;.C..|
|
|
00000020 95 28 d2 a6 0c 27 0f a9 d0 bf 11 c1 52 52 04 32 |.(...'......RR.2|
|
|
00000030 14 9d 4a a1 35 3b 1d 5c 84 b5 72 79 5a fc 4c c9 |..J.5;.\..ryZ.L.|
|
|
00000040 68 ca 64 9f b1 d9 ed 0b 98 66 53 |h.d......fS|
|
|
>>> Flow 5 (client to server)
|
|
00000000 17 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
|
|
00000010 00 00 00 00 00 b8 30 3e 37 f6 8f 50 8b 97 78 81 |......0>7..P..x.|
|
|
00000020 aa 53 ab 4d 44 a4 0a d7 3c 49 7f 59 33 b5 0e 22 |.S.MD...<I.Y3.."|
|
|
00000030 c8 fd c6 70 dc 15 03 03 00 30 00 00 00 00 00 00 |...p.....0......|
|
|
00000040 00 00 00 00 00 00 00 00 00 00 dc 74 fa 86 b9 66 |...........t...f|
|
|
00000050 eb 0b 2e ef 57 b0 09 95 31 e6 8a 06 de 93 f7 7f |....W...1.......|
|
|
00000060 46 f1 7d b8 e3 16 fa 68 13 60 |F.}....h.`|
|