mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
crypto/tls: implement Extended Master Secret
All OpenSSL tests now test operation with EMS. To test a handshake *without* EMS we need to pass -Options=-ExtendedMasterSecret which is only available in OpenSSL 3.1, which breaks a number of other tests. Updates #43922 Change-Id: Ib9ac79a1d03fab6bfba5fe9cd66689cff661cda7 Reviewed-on: https://go-review.googlesource.com/c/go/+/497376 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
parent
1143de0f03
commit
d154b73cf1
120 changed files with 9366 additions and 9243 deletions
138
testdata/Server-TLSv12-ECDHE-ECDSA-AES
vendored
138
testdata/Server-TLSv12-ECDHE-ECDSA-AES
vendored
|
@ -1,7 +1,7 @@
|
|||
>>> Flow 1 (client to server)
|
||||
00000000 16 03 01 00 85 01 00 00 81 03 03 20 34 f0 4b 7a |........... 4.Kz|
|
||||
00000010 4f ed 31 de 38 ef 33 2e 69 7d 74 35 e5 02 b9 bb |O.1.8.3.i}t5....|
|
||||
00000020 bd 1a 5c 3a f2 57 f1 23 62 66 52 00 00 04 c0 0a |..\:.W.#bfR.....|
|
||||
00000000 16 03 01 00 85 01 00 00 81 03 03 83 21 a6 e4 ea |............!...|
|
||||
00000010 e9 7b 3a 7c 72 28 ee 68 c5 c7 fa f1 98 ed 4a be |.{:|r(.h......J.|
|
||||
00000020 b8 42 13 fb d3 ab 63 16 d2 74 c8 00 00 04 c0 0a |.B....c..t......|
|
||||
00000030 00 ff 01 00 00 54 00 0b 00 04 03 00 01 02 00 0a |.....T..........|
|
||||
00000040 00 0c 00 0a 00 1d 00 17 00 1e 00 19 00 18 00 16 |................|
|
||||
00000050 00 00 00 17 00 00 00 0d 00 30 00 2e 04 03 05 03 |.........0......|
|
||||
|
@ -9,76 +9,76 @@
|
|||
00000070 08 06 04 01 05 01 06 01 03 03 02 03 03 01 02 01 |................|
|
||||
00000080 03 02 02 02 04 02 05 02 06 02 |..........|
|
||||
>>> Flow 2 (server to client)
|
||||
00000000 16 03 03 00 37 02 00 00 33 03 03 00 00 00 00 00 |....7...3.......|
|
||||
00000000 16 03 03 00 3b 02 00 00 37 03 03 00 00 00 00 00 |....;...7.......|
|
||||
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
|
||||
00000020 00 00 00 44 4f 57 4e 47 52 44 01 00 c0 0a 00 00 |...DOWNGRD......|
|
||||
00000030 0b ff 01 00 01 00 00 0b 00 02 01 00 16 03 03 02 |................|
|
||||
00000040 0e 0b 00 02 0a 00 02 07 00 02 04 30 82 02 00 30 |...........0...0|
|
||||
00000050 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 eb f4 30 09 |..b.....-G....0.|
|
||||
00000060 06 07 2a 86 48 ce 3d 04 01 30 45 31 0b 30 09 06 |..*.H.=..0E1.0..|
|
||||
00000070 03 55 04 06 13 02 41 55 31 13 30 11 06 03 55 04 |.U....AU1.0...U.|
|
||||
00000080 08 13 0a 53 6f 6d 65 2d 53 74 61 74 65 31 21 30 |...Some-State1!0|
|
||||
00000090 1f 06 03 55 04 0a 13 18 49 6e 74 65 72 6e 65 74 |...U....Internet|
|
||||
000000a0 20 57 69 64 67 69 74 73 20 50 74 79 20 4c 74 64 | Widgits Pty Ltd|
|
||||
000000b0 30 1e 17 0d 31 32 31 31 32 32 31 35 30 36 33 32 |0...121122150632|
|
||||
000000c0 5a 17 0d 32 32 31 31 32 30 31 35 30 36 33 32 5a |Z..221120150632Z|
|
||||
000000d0 30 45 31 0b 30 09 06 03 55 04 06 13 02 41 55 31 |0E1.0...U....AU1|
|
||||
000000e0 13 30 11 06 03 55 04 08 13 0a 53 6f 6d 65 2d 53 |.0...U....Some-S|
|
||||
000000f0 74 61 74 65 31 21 30 1f 06 03 55 04 0a 13 18 49 |tate1!0...U....I|
|
||||
00000100 6e 74 65 72 6e 65 74 20 57 69 64 67 69 74 73 20 |nternet Widgits |
|
||||
00000110 50 74 79 20 4c 74 64 30 81 9b 30 10 06 07 2a 86 |Pty Ltd0..0...*.|
|
||||
00000120 48 ce 3d 02 01 06 05 2b 81 04 00 23 03 81 86 00 |H.=....+...#....|
|
||||
00000130 04 00 c4 a1 ed be 98 f9 0b 48 73 36 7e c3 16 56 |.........Hs6~..V|
|
||||
00000140 11 22 f2 3d 53 c3 3b 4d 21 3d cd 6b 75 e6 f6 b0 |.".=S.;M!=.ku...|
|
||||
00000150 dc 9a df 26 c1 bc b2 87 f0 72 32 7c b3 64 2f 1c |...&.....r2|.d/.|
|
||||
00000160 90 bc ea 68 23 10 7e fe e3 25 c0 48 3a 69 e0 28 |...h#.~..%.H:i.(|
|
||||
00000170 6d d3 37 00 ef 04 62 dd 0d a0 9c 70 62 83 d8 81 |m.7...b....pb...|
|
||||
00000180 d3 64 31 aa 9e 97 31 bd 96 b0 68 c0 9b 23 de 76 |.d1...1...h..#.v|
|
||||
00000190 64 3f 1a 5c 7f e9 12 0e 58 58 b6 5f 70 dd 9b d8 |d?.\....XX._p...|
|
||||
000001a0 ea d5 d7 f5 d5 cc b9 b6 9f 30 66 5b 66 9a 20 e2 |.........0f[f. .|
|
||||
000001b0 27 e5 bf fe 3b 30 09 06 07 2a 86 48 ce 3d 04 01 |'...;0...*.H.=..|
|
||||
000001c0 03 81 8c 00 30 81 88 02 42 01 88 a2 4f eb e2 45 |....0...B...O..E|
|
||||
000001d0 c5 48 7d 1b ac f5 ed 98 9d ae 47 70 c0 5e 1b b6 |.H}.......Gp.^..|
|
||||
000001e0 2f bd f1 b6 4d b7 61 40 d3 11 a2 ce ee 0b 7e 92 |/...M.a@......~.|
|
||||
000001f0 7e ff 76 9d c3 3b 7e a5 3f ce fa 10 e2 59 ec 47 |~.v..;~.?....Y.G|
|
||||
00000200 2d 7c ac da 4e 97 0e 15 a0 6f d0 02 42 01 4d fc |-|..N....o..B.M.|
|
||||
00000210 be 67 13 9c 2d 05 0e bd 3f a3 8c 25 c1 33 13 83 |.g..-...?..%.3..|
|
||||
00000220 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 2e dd d7 11 |.....7z..z......|
|
||||
00000230 69 7f 85 7c 56 de fb 31 78 2b e4 c7 78 0d ae cb |i..|V..1x+..x...|
|
||||
00000240 be 9e 4e 36 24 31 7b 6a 0f 39 95 12 07 8f 2a 16 |..N6$1{j.9....*.|
|
||||
00000250 03 03 00 b6 0c 00 00 b2 03 00 1d 20 2f e5 7d a3 |........... /.}.|
|
||||
00000260 47 cd 62 43 15 28 da ac 5f bb 29 07 30 ff f6 84 |G.bC.(.._.).0...|
|
||||
00000270 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 04 03 00 8a |......._X.;t....|
|
||||
00000280 30 81 87 02 41 21 2b cf 6b fc 8a 13 b6 21 8a 46 |0...A!+.k....!.F|
|
||||
00000290 fc 7c 56 7e 28 22 4d b2 c2 c8 45 92 cc 99 6a 3c |.|V~("M...E...j<|
|
||||
000002a0 48 0f 16 95 6c 43 3d ea bd ac 25 88 a3 35 0c 14 |H...lC=...%..5..|
|
||||
000002b0 c6 43 46 16 ec b5 57 76 86 1c 5a d1 52 44 3b 8c |.CF...Wv..Z.RD;.|
|
||||
000002c0 e5 b3 46 3b 47 d8 02 42 01 ad a2 c3 4c 69 35 13 |..F;G..B....Li5.|
|
||||
000002d0 d7 66 37 63 c9 43 50 68 f6 ff 7f 7d be 7e 8d 89 |.f7c.CPh...}.~..|
|
||||
000002e0 db 57 3e 0f 51 c8 49 9b 3a e2 87 65 dd 28 21 9a |.W>.Q.I.:..e.(!.|
|
||||
000002f0 c3 36 28 a4 e8 25 7b ae 8e 45 35 22 8f 2d 97 27 |.6(..%{..E5".-.'|
|
||||
00000300 fe b8 99 a9 c1 5f d8 8b 70 d3 16 03 03 00 04 0e |....._..p.......|
|
||||
00000310 00 00 00 |...|
|
||||
00000030 0f ff 01 00 01 00 00 17 00 00 00 0b 00 02 01 00 |................|
|
||||
00000040 16 03 03 02 0e 0b 00 02 0a 00 02 07 00 02 04 30 |...............0|
|
||||
00000050 82 02 00 30 82 01 62 02 09 00 b8 bf 2d 47 a0 d2 |...0..b.....-G..|
|
||||
00000060 eb f4 30 09 06 07 2a 86 48 ce 3d 04 01 30 45 31 |..0...*.H.=..0E1|
|
||||
00000070 0b 30 09 06 03 55 04 06 13 02 41 55 31 13 30 11 |.0...U....AU1.0.|
|
||||
00000080 06 03 55 04 08 13 0a 53 6f 6d 65 2d 53 74 61 74 |..U....Some-Stat|
|
||||
00000090 65 31 21 30 1f 06 03 55 04 0a 13 18 49 6e 74 65 |e1!0...U....Inte|
|
||||
000000a0 72 6e 65 74 20 57 69 64 67 69 74 73 20 50 74 79 |rnet Widgits Pty|
|
||||
000000b0 20 4c 74 64 30 1e 17 0d 31 32 31 31 32 32 31 35 | Ltd0...12112215|
|
||||
000000c0 30 36 33 32 5a 17 0d 32 32 31 31 32 30 31 35 30 |0632Z..221120150|
|
||||
000000d0 36 33 32 5a 30 45 31 0b 30 09 06 03 55 04 06 13 |632Z0E1.0...U...|
|
||||
000000e0 02 41 55 31 13 30 11 06 03 55 04 08 13 0a 53 6f |.AU1.0...U....So|
|
||||
000000f0 6d 65 2d 53 74 61 74 65 31 21 30 1f 06 03 55 04 |me-State1!0...U.|
|
||||
00000100 0a 13 18 49 6e 74 65 72 6e 65 74 20 57 69 64 67 |...Internet Widg|
|
||||
00000110 69 74 73 20 50 74 79 20 4c 74 64 30 81 9b 30 10 |its Pty Ltd0..0.|
|
||||
00000120 06 07 2a 86 48 ce 3d 02 01 06 05 2b 81 04 00 23 |..*.H.=....+...#|
|
||||
00000130 03 81 86 00 04 00 c4 a1 ed be 98 f9 0b 48 73 36 |.............Hs6|
|
||||
00000140 7e c3 16 56 11 22 f2 3d 53 c3 3b 4d 21 3d cd 6b |~..V.".=S.;M!=.k|
|
||||
00000150 75 e6 f6 b0 dc 9a df 26 c1 bc b2 87 f0 72 32 7c |u......&.....r2||
|
||||
00000160 b3 64 2f 1c 90 bc ea 68 23 10 7e fe e3 25 c0 48 |.d/....h#.~..%.H|
|
||||
00000170 3a 69 e0 28 6d d3 37 00 ef 04 62 dd 0d a0 9c 70 |:i.(m.7...b....p|
|
||||
00000180 62 83 d8 81 d3 64 31 aa 9e 97 31 bd 96 b0 68 c0 |b....d1...1...h.|
|
||||
00000190 9b 23 de 76 64 3f 1a 5c 7f e9 12 0e 58 58 b6 5f |.#.vd?.\....XX._|
|
||||
000001a0 70 dd 9b d8 ea d5 d7 f5 d5 cc b9 b6 9f 30 66 5b |p............0f[|
|
||||
000001b0 66 9a 20 e2 27 e5 bf fe 3b 30 09 06 07 2a 86 48 |f. .'...;0...*.H|
|
||||
000001c0 ce 3d 04 01 03 81 8c 00 30 81 88 02 42 01 88 a2 |.=......0...B...|
|
||||
000001d0 4f eb e2 45 c5 48 7d 1b ac f5 ed 98 9d ae 47 70 |O..E.H}.......Gp|
|
||||
000001e0 c0 5e 1b b6 2f bd f1 b6 4d b7 61 40 d3 11 a2 ce |.^../...M.a@....|
|
||||
000001f0 ee 0b 7e 92 7e ff 76 9d c3 3b 7e a5 3f ce fa 10 |..~.~.v..;~.?...|
|
||||
00000200 e2 59 ec 47 2d 7c ac da 4e 97 0e 15 a0 6f d0 02 |.Y.G-|..N....o..|
|
||||
00000210 42 01 4d fc be 67 13 9c 2d 05 0e bd 3f a3 8c 25 |B.M..g..-...?..%|
|
||||
00000220 c1 33 13 83 0d 94 06 bb d4 37 7a f6 ec 7a c9 86 |.3.......7z..z..|
|
||||
00000230 2e dd d7 11 69 7f 85 7c 56 de fb 31 78 2b e4 c7 |....i..|V..1x+..|
|
||||
00000240 78 0d ae cb be 9e 4e 36 24 31 7b 6a 0f 39 95 12 |x.....N6$1{j.9..|
|
||||
00000250 07 8f 2a 16 03 03 00 b7 0c 00 00 b3 03 00 1d 20 |..*............ |
|
||||
00000260 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f bb 29 07 |/.}.G.bC.(.._.).|
|
||||
00000270 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 cb 3b 74 |0.........._X.;t|
|
||||
00000280 04 03 00 8b 30 81 88 02 42 00 b9 39 44 59 12 77 |....0...B..9DY.w|
|
||||
00000290 8d e2 79 25 01 d1 6a 05 3d 53 ea f3 91 d6 c5 09 |..y%..j.=S......|
|
||||
000002a0 24 bd 0c ad 24 cc 1c a7 fb 03 eb 0a 0d f4 30 96 |$...$.........0.|
|
||||
000002b0 8d 28 a1 b3 64 ba 30 27 95 29 23 22 91 62 c3 1f |.(..d.0'.)#".b..|
|
||||
000002c0 51 aa c8 be 17 85 31 8e f5 40 3e 02 42 00 ee a1 |Q.....1..@>.B...|
|
||||
000002d0 64 14 a1 52 b3 e5 54 c9 24 53 94 5a 43 d8 4f 79 |d..R..T.$S.ZC.Oy|
|
||||
000002e0 69 4b a8 51 ee de b3 b0 f7 1a 57 a3 28 72 d2 13 |iK.Q......W.(r..|
|
||||
000002f0 a6 d3 17 0b c4 45 34 7f 10 3b 81 cb 0c 8d 51 b6 |.....E4..;....Q.|
|
||||
00000300 0b 86 21 d0 ee 1d 7e 73 6b ea 77 8c 66 dc 65 16 |..!...~sk.w.f.e.|
|
||||
00000310 03 03 00 04 0e 00 00 00 |........|
|
||||
>>> Flow 3 (client to server)
|
||||
00000000 16 03 03 00 25 10 00 00 21 20 c4 25 45 6f 39 18 |....%...! .%Eo9.|
|
||||
00000010 b1 f6 0a b3 f7 3e 98 ed 63 ae bd 74 12 91 0d 81 |.....>..c..t....|
|
||||
00000020 84 71 13 3c a7 cf a5 d2 24 5f 14 03 03 00 01 01 |.q.<....$_......|
|
||||
00000030 16 03 03 00 40 27 8d 44 74 7a ae 8a 4e 1c f9 1b |....@'.Dtz..N...|
|
||||
00000040 05 23 c4 89 57 27 4c dc db 4a ae aa 08 74 00 55 |.#..W'L..J...t.U|
|
||||
00000050 f9 4e 63 02 75 24 ca fb 30 78 cc 82 8a 69 be ab |.Nc.u$..0x...i..|
|
||||
00000060 10 9d 25 2d a8 b6 bb 64 6e 32 68 4b 0a 32 06 74 |..%-...dn2hK.2.t|
|
||||
00000070 26 5e bc 68 25 |&^.h%|
|
||||
00000000 16 03 03 00 25 10 00 00 21 20 ed 3e ba a7 43 53 |....%...! .>..CS|
|
||||
00000010 5e e4 60 aa 31 3f e1 69 60 32 25 3d fd 8b 32 da |^.`.1?.i`2%=..2.|
|
||||
00000020 f2 c5 db c7 02 e6 4d d0 de 15 14 03 03 00 01 01 |......M.........|
|
||||
00000030 16 03 03 00 40 ee 28 f2 27 82 24 9d 17 d1 48 7a |....@.(.'.$...Hz|
|
||||
00000040 74 2d dd 16 18 b7 70 97 2f 2b 91 47 eb c2 1d ae |t-....p./+.G....|
|
||||
00000050 3f 48 52 cd ff e7 9e 0b 35 ad 1f 60 5e 07 b1 5e |?HR.....5..`^..^|
|
||||
00000060 1c ba 6a 85 bb 6b 30 94 41 8a 59 81 cf 37 5f 26 |..j..k0.A.Y..7_&|
|
||||
00000070 b1 52 36 5f df |.R6_.|
|
||||
>>> Flow 4 (server to client)
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....|
|
||||
00000010 00 00 00 00 00 00 00 00 00 00 00 b0 cf 70 b3 00 |.............p..|
|
||||
00000020 89 e2 77 af 87 08 f5 2f 2c c8 75 ce 8a ed 30 d8 |..w..../,.u...0.|
|
||||
00000030 f7 44 f3 9d 8b 4c 42 7a 52 d0 c8 37 9b 45 46 1c |.D...LBzR..7.EF.|
|
||||
00000040 56 3b ee 52 5d c4 72 04 13 49 aa 17 03 03 00 40 |V;.R].r..I.....@|
|
||||
00000010 00 00 00 00 00 00 00 00 00 00 00 f5 05 5a a6 22 |.............Z."|
|
||||
00000020 90 4e 8d d9 f1 55 c4 78 f2 ec 9d 97 cd fe af ae |.N...U.x........|
|
||||
00000030 b7 62 00 67 2e b2 d9 1e 0c a3 c8 6a bf d2 3c 42 |.b.g.......j..<B|
|
||||
00000040 c4 0a d1 08 36 64 8e bd 0a 2f a2 17 03 03 00 40 |....6d.../.....@|
|
||||
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
|
||||
00000060 ce c4 34 c2 d8 4e f5 db d1 ff 6d 64 ae 39 6d 78 |..4..N....md.9mx|
|
||||
00000070 3c c4 57 32 d1 af 35 d3 b4 79 3c b4 bd a1 21 7b |<.W2..5..y<...!{|
|
||||
00000080 1f ef b8 3c 97 37 18 e5 10 62 e8 3d 7d 12 f5 db |...<.7...b.=}...|
|
||||
00000060 ef 16 5e cb e7 c4 2d a8 76 77 da 18 91 bd cb 78 |..^...-.vw.....x|
|
||||
00000070 76 c5 5d 70 e5 ba 57 2a 1f 2b 11 3f 18 18 e6 1b |v.]p..W*.+.?....|
|
||||
00000080 36 78 c9 f1 5e 71 f1 71 f1 01 31 e6 37 fa 76 92 |6x..^q.q..1.7.v.|
|
||||
00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
|
||||
000000a0 00 00 00 00 00 81 75 ae 71 18 61 61 ae 35 ce c8 |......u.q.aa.5..|
|
||||
000000b0 43 57 52 c9 68 5e 0d 63 c4 0e 7d 36 90 b2 f6 f6 |CWR.h^.c..}6....|
|
||||
000000c0 ea 72 3c d9 41 |.r<.A|
|
||||
000000a0 00 00 00 00 00 13 3e 42 a5 61 84 ae 49 8b b9 91 |......>B.a..I...|
|
||||
000000b0 c2 a3 76 74 1e 4f 53 0a fc 71 de 0d d2 44 c8 ac |..vt.OS..q...D..|
|
||||
000000c0 2e 09 27 e6 ad |..'..|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue