crypto/tls: support AES-128-CBC cipher suites with SHA-256.

These were new with TLS 1.2 and, reportedly, some servers require it.
Since it's easy, this change adds suport for three flavours of
AES-128-CBC with SHA-256 MACs.

Other testdata/ files have to be updated because this changes the list
of cipher suites offered by default by the client.

Fixes #15487.

Change-Id: I1b14330c31eeda20185409a37072343552c3464f
Reviewed-on: https://go-review.googlesource.com/27315
Run-TryBot: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Jonathan Rudenberg <jonathan@titanous.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Adam Langley 2016-08-17 16:45:47 -07:00
parent 5ad0511ca2
commit e099795efd
34 changed files with 2043 additions and 1717 deletions

View file

@ -1,19 +1,19 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 85 01 00 00 81 03 03 00 00 00 00 00 |................|
00000000 16 03 01 00 8b 01 00 00 87 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 00 00 22 c0 2f |............."./|
00000030 c0 2b c0 30 c0 2c c0 11 c0 07 c0 13 c0 09 c0 14 |.+.0.,..........|
00000040 c0 0a 00 9c 00 9d 00 05 00 2f 00 35 c0 12 00 0a |........./.5....|
00000050 01 00 00 36 00 05 00 05 01 00 00 00 00 00 0a 00 |...6............|
00000060 08 00 06 00 17 00 18 00 19 00 0b 00 02 01 00 00 |................|
00000070 0d 00 0e 00 0c 04 01 04 03 05 01 05 03 02 01 02 |................|
00000080 03 ff 01 00 01 00 00 12 00 00 |..........|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 28 c0 2f |.............(./|
00000030 c0 2b c0 30 c0 2c c0 27 c0 13 c0 23 c0 09 c0 14 |.+.0.,.'...#....|
00000040 c0 0a 00 9c 00 9d 00 3c 00 2f 00 35 c0 12 00 0a |.......<./.5....|
00000050 00 05 c0 11 c0 07 01 00 00 36 00 05 00 05 01 00 |.........6......|
00000060 00 00 00 00 0a 00 08 00 06 00 17 00 18 00 19 00 |................|
00000070 0b 00 02 01 00 00 0d 00 0e 00 0c 04 01 04 03 05 |................|
00000080 01 05 03 02 01 02 03 ff 01 00 01 00 00 12 00 00 |................|
>>> Flow 2 (server to client)
00000000 16 03 03 00 59 02 00 00 55 03 03 99 c8 37 1a 6f |....Y...U....7.o|
00000010 c8 e2 cc a8 b5 1d 84 f5 93 58 ad 46 0a e6 60 f1 |.........X.F..`.|
00000020 e4 e0 b4 b4 bb d1 30 58 ff 19 49 20 d7 42 c8 0e |......0X..I .B..|
00000030 fe 36 01 8e 0d 16 c2 ad cb 6c cc 48 92 92 db 18 |.6.......l.H....|
00000040 7b df 24 bc 39 ca 45 9a 05 ad 00 4b c0 09 00 00 |{.$.9.E....K....|
00000000 16 03 03 00 59 02 00 00 55 03 03 1f be bf a9 e9 |....Y...U.......|
00000010 1f 9e 3c 62 61 f4 0b b4 7e 08 85 e7 20 0a 1f c2 |..<ba...~... ...|
00000020 50 e0 7d 3e 87 83 2e f6 b5 3b 01 20 a3 ae 72 07 |P.}>.....;. ..r.|
00000030 49 15 58 81 fe d4 5c b9 df 88 68 d0 54 3c ae bd |I.X...\...h.T<..|
00000040 19 5b ae 30 d2 53 56 67 ef 05 71 69 c0 09 00 00 |.[.0.SVg..qi....|
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....|
@ -48,20 +48,20 @@
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 d7 0c 00 00 d3 03 00 17 41 04 72 |*............A.r|
00000280 6c 04 6f 1c 07 08 23 a7 3b ca 68 46 9d f4 ac e1 |l.o...#.;.hF....|
00000290 6d 76 62 04 45 d9 f7 f0 f4 9e 1c 76 51 98 a9 8d |mvb.E......vQ...|
000002a0 4f 54 bd 15 25 1e a9 07 76 c8 e3 31 1b 88 59 3b |OT..%...v..1..Y;|
000002b0 1f 36 7c cf 48 5d ba 9f 35 c8 92 a7 41 ed 89 04 |.6|.H]..5...A...|
000002c0 03 00 8a 30 81 87 02 41 31 bc 40 4d 6c 1b 93 b2 |...0...A1.@Ml...|
000002d0 d8 95 16 9c 3a 63 f0 5c e4 20 7e fb d2 01 1b 23 |....:c.\. ~....#|
000002e0 bc 8e bc 4b 6d a0 21 3a 62 e4 52 66 bf b4 94 45 |...Km.!:b.Rf...E|
000002f0 a2 7f 21 31 f5 ef 50 13 2c 93 25 c4 61 ae 05 10 |..!1..P.,.%.a...|
00000300 b7 5d e3 bf 7c 99 e3 39 41 02 42 01 b0 cf 42 cd |.]..|..9A.B...B.|
00000310 88 c7 55 93 2f 81 a4 05 bd 5d 0c c8 fd a5 20 18 |..U./....].... .|
00000320 45 e2 f5 3f a6 5c 01 45 01 a2 21 14 5d 36 48 34 |E..?.\.E..!.]6H4|
00000330 e1 20 da fc da a2 35 37 fc a7 6e f8 12 5e a2 ed |. ....57..n..^..|
00000340 6c c7 ac a7 48 bc 0e 51 0e e9 b7 7f 35 16 03 03 |l...H..Q....5...|
00000270 2a 16 03 03 00 d7 0c 00 00 d3 03 00 17 41 04 85 |*............A..|
00000280 5d 2e 2a 16 9e b3 a4 69 17 f5 13 ce 32 8f 67 37 |].*....i....2.g7|
00000290 74 ab cf e2 69 80 fb 71 15 08 df f4 18 f3 76 36 |t...i..q......v6|
000002a0 1a 06 aa 6e 3d de c0 71 05 65 6f 4b 05 86 93 fe |...n=..q.eoK....|
000002b0 34 82 59 77 2f 5b c6 4c 63 8b 6f 7f 60 d6 ba 04 |4.Yw/[.Lc.o.`...|
000002c0 03 00 8a 30 81 87 02 42 01 37 25 e6 ad 0a 35 db |...0...B.7%...5.|
000002d0 e6 76 90 15 ed 10 66 7f 19 9d e5 59 31 89 d7 be |.v....f....Y1...|
000002e0 b2 e2 18 f2 42 30 98 86 2f ef 23 a4 70 79 51 97 |....B0../.#.pyQ.|
000002f0 98 ac 6e 31 4e e8 e4 b3 d8 22 cc 32 46 1d e1 d2 |..n1N....".2F...|
00000300 77 cb dd b5 c6 03 b6 52 ac 66 02 41 37 c2 d8 75 |w......R.f.A7..u|
00000310 75 18 22 97 03 67 86 04 18 e4 29 96 ba 29 92 85 |u."..g....)..)..|
00000320 a0 55 72 12 f4 bb 70 b5 3a 62 2d 0c f6 cf 92 15 |.Ur...p.:b-.....|
00000330 4f 31 11 75 f9 81 b6 a3 ff dc 9c e3 be 26 8c 2f |O1.u.........&./|
00000340 fc 5d ef e2 b9 e5 0e 93 eb 95 f6 5f 22 16 03 03 |.]........._"...|
00000350 00 2e 0d 00 00 26 03 01 02 40 00 1e 06 01 06 02 |.....&...@......|
00000360 06 03 05 01 05 02 05 03 04 01 04 02 04 03 03 01 |................|
00000370 03 02 03 03 02 01 02 02 02 03 00 00 0e 00 00 00 |................|
@ -103,31 +103,31 @@
00000220 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e f8 2b 2d |g..$ >.V...(^.+-|
00000230 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 e9 58 b6 |O....lK[.V.2B.X.|
00000240 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 16 03 03 |.I..h.A.Vk.Z....|
00000250 00 88 0f 00 00 84 05 01 00 80 6a 47 26 9b 8b 83 |..........jG&...|
00000260 e9 ac 99 b7 59 5a c4 a3 28 97 ea 8b 40 dc 41 10 |....YZ..(...@.A.|
00000270 e5 57 cb 1c 95 c4 86 96 8b db 3a 5e d6 6c 5d 80 |.W........:^.l].|
00000280 eb 32 7b c3 53 17 de 75 60 39 dc 92 e5 8a d7 1b |.2{.S..u`9......|
00000290 7f 8e 07 d5 5f ee f6 43 0c f5 95 61 6c 58 55 f1 |...._..C...alXU.|
000002a0 86 9d 91 91 af 81 28 7a a3 9a ca 40 31 90 67 3b |......(z...@1.g;|
000002b0 0a 14 8a 1c e1 cd 15 6f 84 a6 7d 47 1e 61 8f 38 |.......o..}G.a.8|
000002c0 3a c2 bc e7 af b8 50 87 c6 1b 78 aa 1b d6 e1 94 |:.....P...x.....|
000002d0 ce ad 9f e3 03 4c ae e6 ac 29 14 03 03 00 01 01 |.....L...)......|
00000250 00 88 0f 00 00 84 05 01 00 80 5e 85 82 65 fe 5d |..........^..e.]|
00000260 e7 61 47 f0 64 2e 7a 35 0d 7b 8b bd ce 39 56 ee |.aG.d.z5.{...9V.|
00000270 f0 1d 1c 0c 40 6c ed 06 69 b1 29 71 20 36 ca 79 |....@l..i.)q 6.y|
00000280 ca b2 74 92 f3 fc c6 b7 f9 5f d0 22 dc 17 d1 25 |..t......_."...%|
00000290 4a c2 9f 9d 62 92 1b e3 34 8c 1e f8 85 8a 3b 58 |J...b...4.....;X|
000002a0 f0 0a a0 31 05 a0 a7 a1 44 a6 8b 9b d9 72 38 16 |...1....D....r8.|
000002b0 33 c1 66 f2 6a 0c 9c 65 8b 1a 09 91 9b 72 ad 4d |3.f.j..e.....r.M|
000002c0 98 37 a7 54 54 f2 0c 7b 95 92 5d 11 94 59 6c 29 |.7.TT..{..]..Yl)|
000002d0 e7 4e 5e 46 69 35 43 b8 16 02 14 03 03 00 01 01 |.N^Fi5C.........|
000002e0 16 03 03 00 40 00 00 00 00 00 00 00 00 00 00 00 |....@...........|
000002f0 00 00 00 00 00 df a6 96 c2 af 11 9b 19 aa 85 39 |...............9|
00000300 d7 08 db 5a 04 79 21 8d 63 54 98 40 ac 0e 53 ce |...Z.y!.cT.@..S.|
00000310 fa 39 75 a7 05 f4 75 75 cd ef 01 46 94 a3 a0 5d |.9u...uu...F...]|
00000320 01 41 66 7c 12 |.Af|.|
000002f0 00 00 00 00 00 a9 87 01 27 8d 4b 5b b9 13 17 50 |........'.K[...P|
00000300 62 f3 16 e3 84 3e 38 3e dc fe 7d 1d de a7 29 73 |b....>8>..}...)s|
00000310 3e dc e8 03 65 c9 08 96 50 05 df 15 5f 1f bb f0 |>...e...P..._...|
00000320 77 cf a2 9e e8 |w....|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 40 d0 d9 13 15 f1 |..........@.....|
00000010 5a d0 64 d5 7b dd 0d f2 11 74 7e f2 c5 fa c8 45 |Z.d.{....t~....E|
00000020 ca 2f 90 db ab a2 2b 9e 6f d2 6c ec eb d8 8c f2 |./....+.o.l.....|
00000030 91 89 48 09 ae 8b d2 92 97 8b 75 df a1 2d 42 fb |..H.......u..-B.|
00000040 6b 97 5d bb 1a af f0 d3 6a 51 41 |k.].....jQA|
00000000 14 03 03 00 01 01 16 03 03 00 40 04 00 1e 59 5c |..........@...Y\|
00000010 df 15 6d 6a 44 99 3d b5 28 f2 86 7c 93 a3 20 ec |..mjD.=.(..|.. .|
00000020 fc 1c 7c 16 9c 33 fb a5 20 f7 2f 76 81 6d 75 e6 |..|..3.. ./v.mu.|
00000030 4b 60 5b 9c 8b 6e a7 33 a6 7f ff c5 8b 2e c3 30 |K`[..n.3.......0|
00000040 a6 60 91 f7 41 b2 5f de 14 b7 01 |.`..A._....|
>>> 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 0c a8 43 70 49 c0 a5 f9 c4 3e 21 |.......CpI....>!|
00000020 7e 20 c8 68 68 52 9c 57 ff 4b fd 54 32 3f c3 41 |~ .hhR.W.K.T2?.A|
00000030 31 cf 4d d4 4d 15 03 03 00 30 00 00 00 00 00 00 |1.M.M....0......|
00000040 00 00 00 00 00 00 00 00 00 00 36 7b ec a1 91 77 |..........6{...w|
00000050 16 aa f7 72 2a b9 61 1c dd 96 83 db 3b ed 96 d6 |...r*.a.....;...|
00000060 55 c1 a6 ad 39 3c 5b 63 3f da |U...9<[c?.|
00000010 00 00 00 00 00 99 b2 5a 3e aa 44 e9 44 47 46 34 |.......Z>.D.DGF4|
00000020 a4 b1 d3 48 9a 76 5f e8 d1 fc a4 08 37 d7 9e ab |...H.v_.....7...|
00000030 2b c9 a7 b5 db 15 03 03 00 30 00 00 00 00 00 00 |+........0......|
00000040 00 00 00 00 00 00 00 00 00 00 db a8 98 c2 93 75 |...............u|
00000050 1e 0c b0 2c b0 10 31 9b cd 5a 4a f6 ad 65 64 a9 |...,..1..ZJ..ed.|
00000060 fd 1d 7f ad 2e 57 d8 6d 4e 56 |.....W.mNV|