mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-04 04:27: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
151
testdata/Client-TLSv13-ExportKeyingMaterial
vendored
151
testdata/Client-TLSv13-ExportKeyingMaterial
vendored
|
@ -1,5 +1,5 @@
|
|||
>>> Flow 1 (client to server)
|
||||
00000000 16 03 01 00 fa 01 00 00 f6 03 03 00 00 00 00 00 |................|
|
||||
00000000 16 03 01 00 fe 01 00 00 fa 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 |................|
|
||||
|
@ -7,84 +7,85 @@
|
|||
00000050 cc a8 c0 2b c0 2f c0 2c c0 30 c0 09 c0 13 c0 0a |...+./.,.0......|
|
||||
00000060 c0 14 00 9c 00 9d 00 2f 00 35 c0 12 00 0a c0 23 |......./.5.....#|
|
||||
00000070 c0 27 00 3c c0 07 c0 11 00 05 13 03 13 01 13 02 |.'.<............|
|
||||
00000080 01 00 00 7b 00 05 00 05 01 00 00 00 00 00 0a 00 |...{............|
|
||||
00000080 01 00 00 7f 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|
|
||||
000000c0 01 00 01 00 00 17 00 00 00 12 00 00 00 2b 00 09 |.............+..|
|
||||
000000d0 08 03 04 03 03 03 02 03 01 00 33 00 26 00 24 00 |..........3.&.$.|
|
||||
000000e0 1d 00 20 2f e5 7d a3 47 cd 62 43 15 28 da ac 5f |.. /.}.G.bC.(.._|
|
||||
000000f0 bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 99 5f 58 |.).0.........._X|
|
||||
00000100 cb 3b 74 |.;t|
|
||||
>>> Flow 2 (server to client)
|
||||
00000000 16 03 03 00 7a 02 00 00 76 03 03 d6 7f ef 2d f6 |....z...v.....-.|
|
||||
00000010 82 d9 be 6d 33 80 73 c0 d4 d8 63 e9 95 a6 5b 1f |...m3.s...c...[.|
|
||||
00000020 ce c0 ec 13 07 f4 68 7d cc 79 18 20 00 00 00 00 |......h}.y. ....|
|
||||
00000000 16 03 03 00 7a 02 00 00 76 03 03 5a a0 51 7e b3 |....z...v..Z.Q~.|
|
||||
00000010 75 e4 ba 57 52 a0 56 68 55 2b 40 16 e3 d4 b1 4f |u..WR.VhU+@....O|
|
||||
00000020 5e 2c a0 ab 31 76 e8 c5 ab ca 60 20 00 00 00 00 |^,..1v....` ....|
|
||||
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 03 00 00 |................|
|
||||
00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 00 |..+.....3.$... .|
|
||||
00000060 e9 40 7a 65 78 98 47 43 aa e1 63 fd 6b c4 21 1d |.@zex.GC..c.k.!.|
|
||||
00000070 58 45 5f 64 a0 18 55 a0 c3 14 7d 4e 12 93 7c 14 |XE_d..U...}N..|.|
|
||||
00000080 03 03 00 01 01 17 03 03 00 17 4c 01 0b f7 e7 1b |..........L.....|
|
||||
00000090 a9 47 84 10 3b 50 85 6e 3d 8e 52 bc 99 bf d4 35 |.G..;P.n=.R....5|
|
||||
000000a0 45 17 03 03 02 6d 8c b3 22 04 de 8b 09 e5 e7 9f |E....m..".......|
|
||||
000000b0 d5 1f fb 8a 57 ad a7 93 4c 5f 29 46 df c3 e5 86 |....W...L_)F....|
|
||||
000000c0 66 f1 c7 6b 14 79 cf 9d cc e1 f5 3f 31 2c dc ff |f..k.y.....?1,..|
|
||||
000000d0 77 99 14 9e 56 12 4e a4 cb 56 5c d6 c0 5b 57 dc |w...V.N..V\..[W.|
|
||||
000000e0 22 72 12 2d d6 a0 8a c7 90 e6 41 66 78 1a d7 a6 |"r.-......Afx...|
|
||||
000000f0 87 db f1 e3 9b 86 8c cf 94 22 cf 81 99 20 bc 19 |........."... ..|
|
||||
00000100 50 f9 fe 6c ab ea d4 a2 ee f8 17 1d ae 37 86 2a |P..l.........7.*|
|
||||
00000110 f9 83 3c 59 d0 aa 63 22 18 d5 12 40 be f7 02 f1 |..<Y..c"...@....|
|
||||
00000120 9a bf 07 39 23 73 23 a1 66 70 b7 be 9a 24 de 30 |...9#s#.fp...$.0|
|
||||
00000130 2f 62 6e f8 d5 ee 69 a7 87 3c 73 10 4c 7c 97 42 |/bn...i..<s.L|.B|
|
||||
00000140 62 b9 d5 74 40 f0 d7 b3 74 42 73 d7 41 bc 35 43 |b..t@...tBs.A.5C|
|
||||
00000150 87 2e c5 1b e9 15 e8 5e 18 b9 6b 57 2a ee 59 7a |.......^..kW*.Yz|
|
||||
00000160 1c a6 2b cb b4 db e8 bb 99 87 74 4a ee 57 3a 87 |..+.......tJ.W:.|
|
||||
00000170 3c 2d b9 76 41 4a 7a a5 6a fa 92 e9 80 24 08 dc |<-.vAJz.j....$..|
|
||||
00000180 18 44 4b 59 7c 81 99 29 f2 c4 55 b6 58 71 0d 68 |.DKY|..)..U.Xq.h|
|
||||
00000190 6b 06 bd 13 2c a0 04 15 2e 49 cc 99 7f a6 b4 5d |k...,....I.....]|
|
||||
000001a0 d3 49 a5 21 15 d7 66 2d a2 e8 cd a7 7e 46 c4 ac |.I.!..f-....~F..|
|
||||
000001b0 89 ae cb 58 73 42 9f dc c3 c9 5a 13 2f 6f f7 ab |...XsB....Z./o..|
|
||||
000001c0 04 4b 9f f1 6c c4 ac 0f f5 eb 8d 7a ef cf 01 00 |.K..l......z....|
|
||||
000001d0 8a 02 ec 16 09 c1 e9 27 81 32 70 b1 24 d4 db 4e |.......'.2p.$..N|
|
||||
000001e0 9e 22 65 21 a7 8f 19 d5 c6 57 78 8a fa a6 41 87 |."e!.....Wx...A.|
|
||||
000001f0 52 eb 5d ef f8 7e 3b 34 a5 31 ff 33 33 fd 85 03 |R.]..~;4.1.33...|
|
||||
00000200 e4 94 56 ef 11 c0 fe 84 f6 87 94 26 de 7c bd d1 |..V........&.|..|
|
||||
00000210 1b ea 15 34 62 e5 da bd e6 c4 b0 74 b5 27 ad 21 |...4b......t.'.!|
|
||||
00000220 39 16 c8 be e8 41 50 7b de fb 71 10 4c b1 f4 5a |9....AP{..q.L..Z|
|
||||
00000230 bf ea fd 9b 86 a5 c6 e7 2f c2 13 e4 d2 cd 32 7a |......../.....2z|
|
||||
00000240 6b ad ab 43 12 3b 45 b9 5c e4 cf 2c f9 f3 44 2c |k..C.;E.\..,..D,|
|
||||
00000250 11 31 ce c5 65 dd ea e6 52 bd 8a 35 d0 31 d4 4f |.1..e...R..5.1.O|
|
||||
00000260 01 24 54 e4 d2 bf 6e 79 b2 bf a8 f0 5d 9d 72 44 |.$T...ny....].rD|
|
||||
00000270 6e df 29 8a d2 cc a8 d2 ee 0c 51 50 cd 71 a6 2a |n.).......QP.q.*|
|
||||
00000280 fe 53 2e f7 ae fa 4c 34 d0 68 31 d5 69 be 64 a5 |.S....L4.h1.i.d.|
|
||||
00000290 03 54 31 1a dc f0 9e c7 82 1f 15 d1 64 ff 79 07 |.T1.........d.y.|
|
||||
000002a0 5e 71 3a 98 3c 21 a7 8e 1e bf 2d f3 86 4b 3f 30 |^q:.<!....-..K?0|
|
||||
000002b0 73 0d 7c 5d 57 1b a9 89 2b 52 70 84 8e e6 bb fe |s.|]W...+Rp.....|
|
||||
000002c0 b7 1f 65 6a 08 63 58 16 81 51 09 b2 79 7d 84 c0 |..ej.cX..Q..y}..|
|
||||
000002d0 6f e1 ab 92 35 16 2e 8f 5c 17 2d 5e 68 7f d4 94 |o...5...\.-^h...|
|
||||
000002e0 5a 1b 1d 6c 5f e0 36 a0 ae 54 5b e9 39 1f bc 73 |Z..l_.6..T[.9..s|
|
||||
000002f0 f9 04 80 e9 36 d2 2c de 64 ca 08 95 d0 98 4b da |....6.,.d.....K.|
|
||||
00000300 7b 0d 7f 79 1b a0 56 6c dd 3c 40 52 3e 7a 8f 52 |{..y..Vl.<@R>z.R|
|
||||
00000310 3c c9 2f 17 03 03 00 99 07 91 f0 6b e0 bb 6f 0b |<./........k..o.|
|
||||
00000320 ff 08 69 bc d2 1d f1 40 d2 d7 c7 f6 c2 b3 57 d7 |..i....@......W.|
|
||||
00000330 90 00 c9 9e ef 40 b6 96 86 0d 27 8b 6f ac 54 2f |.....@....'.o.T/|
|
||||
00000340 73 b3 b4 82 1b d3 f5 e9 41 a7 fd d5 b1 67 f7 6e |s.......A....g.n|
|
||||
00000350 2e c1 06 34 ef a3 b9 97 4d a8 64 4f f8 48 24 5c |...4....M.dO.H$\|
|
||||
00000360 66 f4 d7 d4 e3 ad 45 fb 4a 42 0d 19 bb a1 cc b3 |f.....E.JB......|
|
||||
00000370 88 d2 2a d7 c3 53 c4 7b 08 a5 68 dc c4 1a f6 f3 |..*..S.{..h.....|
|
||||
00000380 a1 42 48 1c c9 2b 1f fb 5d fc 49 ed ce 16 14 34 |.BH..+..].I....4|
|
||||
00000390 34 01 c9 ef e6 29 9c 81 1a 7d 7b bd 95 eb ad 5f |4....)...}{...._|
|
||||
000003a0 ce 19 30 9c e6 ae 09 15 3c 2b 38 8b e6 97 76 4e |..0.....<+8...vN|
|
||||
000003b0 dd 17 03 03 00 35 d2 a1 3f 22 e9 2b b6 7a d1 d8 |.....5..?".+.z..|
|
||||
000003c0 7b 87 bf d1 bf 56 0b 55 52 d0 a9 cf ae 57 6e 6f |{....V.UR....Wno|
|
||||
000003d0 29 0c c3 f7 f3 d4 bf ff a4 6b 49 1a 57 57 27 89 |)........kI.WW'.|
|
||||
000003e0 e0 f5 bb d2 16 85 39 40 fd 77 a3 |......9@.w.|
|
||||
00000050 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 1e |..+.....3.$... .|
|
||||
00000060 8e a4 e9 85 bd af 87 81 48 56 10 3d 4d d2 07 42 |........HV.=M..B|
|
||||
00000070 7f a2 db 93 42 98 df 67 6d 79 b3 fb 4f bb 67 14 |....B..gmy..O.g.|
|
||||
00000080 03 03 00 01 01 17 03 03 00 17 db c6 9e 4c ff 07 |.............L..|
|
||||
00000090 33 5a d9 47 e2 08 d5 10 bf 70 c5 5b 22 48 a7 fd |3Z.G.....p.["H..|
|
||||
000000a0 8d 17 03 03 02 6d cd a7 97 1c 26 3c a9 70 93 c5 |.....m....&<.p..|
|
||||
000000b0 98 ac 09 11 75 24 a1 97 4a a7 65 a0 d7 40 08 c9 |....u$..J.e..@..|
|
||||
000000c0 fd 31 5f 47 c3 95 38 cf cd e0 77 52 db c1 fe 3a |.1_G..8...wR...:|
|
||||
000000d0 2e 5f ae 5a 9a cf 96 5f 83 f5 7e 6b b0 d7 bf 27 |._.Z..._..~k...'|
|
||||
000000e0 bd 22 af a1 05 79 48 c7 56 e9 56 a9 4f 34 82 9c |."...yH.V.V.O4..|
|
||||
000000f0 41 c5 cf 72 d1 56 18 d4 fb d7 94 e1 72 9f 2a c0 |A..r.V......r.*.|
|
||||
00000100 2f 3b fe de 46 36 4f 0d 15 12 4d e2 2a fb 42 20 |/;..F6O...M.*.B |
|
||||
00000110 1e 7f 0f 50 be 56 10 2d 83 9f c0 c4 9e 0a 29 c4 |...P.V.-......).|
|
||||
00000120 07 a1 ba c0 70 d4 93 8a 27 a1 e2 00 98 11 3e 4e |....p...'.....>N|
|
||||
00000130 07 46 54 68 5a d2 e3 85 ca 6d 66 b1 28 d7 a3 c9 |.FThZ....mf.(...|
|
||||
00000140 cb 9b 5b 4c 94 4a 56 69 dc 6e ba 84 08 7e 31 14 |..[L.JVi.n...~1.|
|
||||
00000150 5d a0 e0 00 b2 23 63 fe 67 8c ae 75 56 44 9c 9c |]....#c.g..uVD..|
|
||||
00000160 c4 4c 31 a9 d7 df 3b ec 59 1e 2e 85 fd 08 8d ba |.L1...;.Y.......|
|
||||
00000170 b2 09 f6 3e 19 7b 29 ab 6a b3 5a 00 be 76 fb 39 |...>.{).j.Z..v.9|
|
||||
00000180 98 c4 3e 4b a6 ae 68 ba 6c 9a a6 5d 20 33 96 55 |..>K..h.l..] 3.U|
|
||||
00000190 27 66 aa c2 c0 6d f0 80 cc c7 64 5f 7b 42 56 b4 |'f...m....d_{BV.|
|
||||
000001a0 a2 6b a3 29 9a 49 d2 fc 74 53 21 fe e3 87 ab d9 |.k.).I..tS!.....|
|
||||
000001b0 e4 3e e7 8a a0 c6 49 08 d1 45 14 53 fb 28 39 cb |.>....I..E.S.(9.|
|
||||
000001c0 99 86 c2 3f dc b3 f6 86 a7 87 b2 88 d9 4f 62 d6 |...?.........Ob.|
|
||||
000001d0 d4 bb 84 93 56 5a 99 8e 8a 5b 1b 9a 1c ef 4a f1 |....VZ...[....J.|
|
||||
000001e0 85 62 08 1f 27 c2 20 a1 9c 73 91 05 d8 9b 32 90 |.b..'. ..s....2.|
|
||||
000001f0 74 80 08 dd 52 87 9f 6e c3 89 14 f3 23 0e 1f d0 |t...R..n....#...|
|
||||
00000200 3c e0 51 48 a4 b2 f2 43 05 bd a3 95 35 70 37 cc |<.QH...C....5p7.|
|
||||
00000210 89 f3 23 b7 70 5f 36 24 78 ea 21 ec 7c 06 3a d6 |..#.p_6$x.!.|.:.|
|
||||
00000220 b5 fd d1 c4 bb 32 39 78 6a f6 ed 91 83 c8 d4 bd |.....29xj.......|
|
||||
00000230 33 55 cf a8 5a b9 46 ec fa 87 5a c0 35 d1 f6 5e |3U..Z.F...Z.5..^|
|
||||
00000240 1f 7a 8e 82 e1 97 38 f9 ad 6e 00 ba d1 4b 82 dd |.z....8..n...K..|
|
||||
00000250 b0 87 0e 18 70 27 6c cd dd 0d d7 4b 46 e9 a3 dc |....p'l....KF...|
|
||||
00000260 5d 60 e7 eb a9 b4 99 f2 bc 9f a4 ed dc c6 63 24 |]`............c$|
|
||||
00000270 f8 91 f3 ee 7f 47 40 03 95 34 53 8c 38 90 3f 0f |.....G@..4S.8.?.|
|
||||
00000280 a6 d8 a1 a7 39 64 45 7e 9e 94 aa 3e 19 df 28 f1 |....9dE~...>..(.|
|
||||
00000290 ab 14 22 ce e8 80 a6 73 59 f7 92 85 13 20 6c cf |.."....sY.... l.|
|
||||
000002a0 d8 ff ce f4 5d 79 f8 37 38 b6 9f 81 97 9f 72 31 |....]y.78.....r1|
|
||||
000002b0 e0 fe ca d2 03 cd 3b 00 9f cb 55 a7 de 79 80 d8 |......;...U..y..|
|
||||
000002c0 0b ae 5a e6 a7 ba a5 35 da d3 03 95 56 c0 ac c9 |..Z....5....V...|
|
||||
000002d0 2a 36 cf 53 d0 44 48 b3 19 6c 44 ab 6b a1 7f a2 |*6.S.DH..lD.k...|
|
||||
000002e0 f6 18 90 4f 16 a9 d5 77 ef 01 81 e1 ef a7 b9 3f |...O...w.......?|
|
||||
000002f0 35 82 66 c7 9c 82 cc 00 fa 74 71 ed 99 ab fc d5 |5.f......tq.....|
|
||||
00000300 ce 0a 05 80 56 5f 54 79 a9 b2 82 38 af 52 94 d1 |....V_Ty...8.R..|
|
||||
00000310 7e 15 1e 17 03 03 00 99 94 6e e7 f3 9a a6 90 24 |~........n.....$|
|
||||
00000320 c8 59 16 e6 58 d1 a2 55 ab 90 d6 59 00 06 0f 22 |.Y..X..U...Y..."|
|
||||
00000330 2d 7e 1a 13 ce 64 05 a0 e2 a2 22 36 d4 51 69 ce |-~...d...."6.Qi.|
|
||||
00000340 8c 13 85 2e ad a3 9d c9 cf 50 be 06 db 75 41 1e |.........P...uA.|
|
||||
00000350 01 64 8e 55 13 31 42 a0 b9 90 30 75 a3 b5 a1 36 |.d.U.1B...0u...6|
|
||||
00000360 e8 1d 5f 32 f4 8f 68 f3 ca d9 f2 36 cf 77 2a ae |.._2..h....6.w*.|
|
||||
00000370 03 db 01 bb 51 25 bb 65 76 0a 81 bf db 6a 0a 85 |....Q%.ev....j..|
|
||||
00000380 3d 2a ee 71 ff a5 91 75 3f 44 23 31 70 1f b4 4c |=*.q...u?D#1p..L|
|
||||
00000390 a1 f2 ec cb ac bb de 36 3a 46 a6 3d a8 c5 57 92 |.......6:F.=..W.|
|
||||
000003a0 a4 7c d4 54 fa de b6 77 62 95 24 aa 63 70 4a 04 |.|.T...wb.$.cpJ.|
|
||||
000003b0 cb 17 03 03 00 35 07 18 23 d6 3d 11 1c 50 e1 22 |.....5..#.=..P."|
|
||||
000003c0 c7 83 33 84 c3 e1 30 b0 43 68 19 2b c4 43 95 25 |..3...0.Ch.+.C.%|
|
||||
000003d0 8c b7 37 c1 d0 3c ef f4 4f 29 b7 18 34 25 d2 8a |..7..<..O)..4%..|
|
||||
000003e0 44 52 37 4e ff f9 aa 2b 33 61 4a |DR7N...+3aJ|
|
||||
>>> Flow 3 (client to server)
|
||||
00000000 14 03 03 00 01 01 17 03 03 00 35 b3 39 ad 6b 24 |..........5.9.k$|
|
||||
00000010 47 e3 9f 11 f9 7e 9a cf 41 db c8 43 ce 86 ae ce |G....~..A..C....|
|
||||
00000020 0c af 17 42 d7 24 57 13 e6 ba a7 44 7c 72 38 aa |...B.$W....D|r8.|
|
||||
00000030 8f fa a2 a2 9f b0 ba 43 47 20 e8 03 3c 00 ee ad |.......CG ..<...|
|
||||
00000040 17 03 03 00 17 ff 5b 79 f8 c8 0c 7a 52 6d b0 b2 |......[y...zRm..|
|
||||
00000050 22 17 3b 5d f9 75 23 bb 27 38 35 a6 17 03 03 00 |".;].u#.'85.....|
|
||||
00000060 13 d3 94 d9 b5 8b fa dc b6 fe 26 ca b0 52 5c ef |..........&..R\.|
|
||||
00000070 84 e3 3c f9 |..<.|
|
||||
00000000 14 03 03 00 01 01 17 03 03 00 35 7d e0 1b 46 05 |..........5}..F.|
|
||||
00000010 4a e2 11 2c a4 22 62 cb bc e7 f4 11 d2 05 ca c6 |J..,."b.........|
|
||||
00000020 17 98 10 88 03 12 d1 1e 6a dc e8 bb 91 df 65 47 |........j.....eG|
|
||||
00000030 78 f0 32 d1 7d c0 56 92 78 56 6b 75 cc 2d eb 2d |x.2.}.V.xVku.-.-|
|
||||
00000040 17 03 03 00 17 ad cc 95 e5 1c 77 7c de 6f e8 8d |..........w|.o..|
|
||||
00000050 06 8e b6 8e d0 95 3f 71 0b 15 6e 0e 17 03 03 00 |......?q..n.....|
|
||||
00000060 13 8e 23 c7 75 9d f7 e1 b9 b5 ed 79 86 e0 64 68 |..#.u......y..dh|
|
||||
00000070 01 ef 70 e1 |..p.|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue