crypto/tls: re-enable RSA-PSS in TLS 1.2 again

TLS 1.3, which requires RSA-PSS, is now enabled without a GODEBUG
opt-out, and with the introduction of
Certificate.SupportedSignatureAlgorithms (#28660) there is a
programmatic way to avoid RSA-PSS (disable TLS 1.3 with MaxVersion and
use that field to specify only PKCS#1 v1.5 SignatureSchemes).

This effectively reverts 0b3a57b5374bba3fdf88258e2be4c8be65e6a5de,
although following CL 205061 all of the signing-side logic is
conveniently centralized in signatureSchemesForCertificate.

Fixes #32425

Change-Id: I7c9a8893bb5d518d86eae7db82612b9b2cd257d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/205063
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
Filippo Valsorda 2019-11-03 21:28:47 -05:00
parent 555e9b864b
commit 6bb85fe4e7
28 changed files with 1264 additions and 1244 deletions

View file

@ -16,11 +16,11 @@
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 43 a0 10 ae 54 |....Y...U..C...T|
00000010 09 23 be 14 d7 1d b3 64 66 5e 39 4e 42 ed 58 3a |.#.....df^9NB.X:|
00000020 1b de 35 eb ee 9b 86 44 fe 2b a8 20 e7 f1 4a 47 |..5....D.+. ..JG|
00000030 b1 6b f0 fb d7 ed 3c 33 4a 52 bc 9b 39 c0 16 d3 |.k....<3JR..9...|
00000040 f4 0a 7c 38 7e b3 95 31 7a c7 c8 f4 c0 2f 00 00 |..|8~..1z..../..|
00000000 16 03 03 00 59 02 00 00 55 03 03 f3 28 ca c9 ac |....Y...U...(...|
00000010 29 bb 15 80 56 d2 37 09 fa 7d 23 04 d4 79 e7 1d |)...V.7..}#..y..|
00000020 bb 4e c5 60 c8 44 39 02 6a e9 e0 20 b5 ae 39 87 |.N.`.D9.j.. ..9.|
00000030 4e 24 2f 33 02 fe 72 d6 2a 4d 0c 8c da 36 7b 28 |N$/3..r.*M...6{(|
00000040 3c 06 aa b2 60 68 91 7a ae d8 7b e2 c0 2f 00 00 |<...`h.z..{../..|
00000050 0d ff 01 00 01 00 00 0b 00 04 03 00 01 02 16 03 |................|
00000060 03 02 59 0b 00 02 55 00 02 52 00 02 4f 30 82 02 |..Y...U..R..O0..|
00000070 4b 30 82 01 b4 a0 03 02 01 02 02 09 00 e8 f0 9d |K0..............|
@ -60,17 +60,17 @@
00000290 77 8d 0c 1c f1 0f a1 d8 40 83 61 c9 4c 72 2b 9d |w.......@.a.Lr+.|
000002a0 ae db 46 06 06 4d f4 c1 b3 3e c0 d1 bd 42 d4 db |..F..M...>...B..|
000002b0 fe 3d 13 60 84 5c 21 d3 3b e9 fa e7 16 03 03 00 |.=.`.\!.;.......|
000002c0 ac 0c 00 00 a8 03 00 1d 20 e7 c6 c3 84 0a b7 55 |........ ......U|
000002d0 ff fb ae 43 10 da 03 0d 7d 91 77 90 cd 05 6a ab |...C....}.w...j.|
000002e0 08 35 5a 38 23 79 45 9f 54 08 04 00 80 d8 b8 a1 |.5Z8#yE.T.......|
000002f0 67 15 39 93 cc d0 ac e7 55 85 3e 62 f3 a6 d8 35 |g.9.....U.>b...5|
00000300 5e bb 60 4e 33 70 05 47 b8 9e 8c e6 85 65 09 e2 |^.`N3p.G.....e..|
00000310 95 4f 8a d9 4b cb 60 62 3c ef 57 81 ed b4 20 cf |.O..K.`b<.W... .|
00000320 b1 71 d9 62 57 60 fa 07 89 12 a1 90 8f 8f 06 4a |.q.bW`.........J|
00000330 56 c3 81 e0 b6 11 9e ce 33 fe 0f 4e b2 84 cc 4b |V.......3..N...K|
00000340 dc d4 71 e4 43 04 61 11 a9 a6 8a 20 43 a7 0e b6 |..q.C.a.... C...|
00000350 a8 97 43 1b e0 a9 b1 0f e8 19 68 0a 5d 38 d9 69 |..C.......h.]8.i|
00000360 22 65 16 aa 05 16 11 cd 66 4a 4f be 90 16 03 03 |"e......fJO.....|
000002c0 ac 0c 00 00 a8 03 00 1d 20 d4 df 5d 10 ee ba a6 |........ ..]....|
000002d0 51 d7 1b fb bf ed bc d6 b9 34 44 e7 af 23 0e 9b |Q........4D..#..|
000002e0 45 af ba 7a 89 63 03 a9 4c 08 04 00 80 30 2c 0f |E..z.c..L....0,.|
000002f0 2e d9 e4 1d c2 90 01 1c cc cf d4 fe 06 6d c3 aa |.............m..|
00000300 59 d9 d9 bc 16 2f 2c b1 be 90 a3 93 a7 be bc 4d |Y..../,........M|
00000310 d8 f4 ac 21 36 59 a8 21 94 ef d3 c4 53 14 34 18 |...!6Y.!....S.4.|
00000320 c9 10 d5 77 fd 1e ad 15 0f 23 d7 73 90 7a c0 7b |...w.....#.s.z.{|
00000330 b3 b2 e2 df 15 42 35 ce 38 05 52 02 77 b7 b2 2b |.....B5.8.R.w..+|
00000340 6b 88 6a ce d4 20 99 9d e4 fe e8 38 1e 01 b7 78 |k.j.. .....8...x|
00000350 3c ea ac 8e ef 2f 7e e8 22 08 78 42 b7 db 84 80 |<..../~.".xB....|
00000360 8c 61 8a c5 cc d7 1f 6a 8d 5c 1d 2d 0d 16 03 03 |.a.....j.\.-....|
00000370 00 3a 0d 00 00 36 03 01 02 40 00 2e 04 03 05 03 |.:...6...@......|
00000380 06 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 |................|
00000390 08 06 04 01 05 01 06 01 03 03 02 03 03 01 02 01 |................|
@ -112,26 +112,26 @@
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 04 01 00 80 2e af 25 b4 ff 00 08 |...........%....|
00000240 c8 dc 24 49 d5 9b d0 fe b5 81 8d 4e 15 d4 63 bf |..$I.......N..c.|
00000250 8e 4c a4 7d 96 58 a2 4b f4 25 a8 e3 39 fc df 2d |.L.}.X.K.%..9..-|
00000260 7c a0 20 61 86 35 8e 7e ba a5 2c f3 07 ad 84 36 ||. a.5.~..,....6|
00000270 df ef 66 e9 78 d8 5f b3 17 45 31 d4 4a 38 5c 6c |..f.x._..E1.J8\l|
00000280 03 73 3b 74 60 c9 00 d1 64 59 c9 a5 39 00 fc bf |.s;t`...dY..9...|
00000290 9c 3a 99 46 4b 71 90 64 8a 24 2e 37 cf 8a 42 c2 |.:.FKq.d.$.7..B.|
000002a0 56 a6 94 97 60 c5 56 ba de 71 78 6c f2 be ce 16 |V...`.V..qxl....|
000002b0 47 ca 0d 95 3c cc b8 6f b2 14 03 03 00 01 01 16 |G...<..o........|
000002c0 03 03 00 28 00 00 00 00 00 00 00 00 8e 0e 3b 43 |...(..........;C|
000002d0 63 52 24 16 91 bc 50 85 ef 34 ad b9 f0 45 e7 4c |cR$...P..4...E.L|
000002e0 9a 07 1d 46 53 2c 89 79 0f 27 dc 9d |...FS,.y.'..|
00000230 88 0f 00 00 84 08 04 00 80 b8 96 b3 c8 66 a9 fb |.............f..|
00000240 da 1b 82 65 9d 57 e5 e5 e5 60 c9 43 df 6e 99 53 |...e.W...`.C.n.S|
00000250 45 95 b8 58 d1 19 05 50 e1 a7 3c e8 07 ad 57 09 |E..X...P..<...W.|
00000260 9c 95 13 ea 80 24 53 56 b1 13 2d 59 9d e9 60 0f |.....$SV..-Y..`.|
00000270 75 97 d3 4f 82 3a b5 41 3e 90 75 ea 28 97 00 e7 |u..O.:.A>.u.(...|
00000280 74 c9 04 1d d0 16 ba 40 75 9c ae a0 bd 00 b1 a9 |t......@u.......|
00000290 86 d5 1a f2 30 45 72 99 ea b2 eb 61 b1 63 72 c5 |....0Er....a.cr.|
000002a0 ad b1 60 a8 fa bd 95 95 17 03 4c 8e 87 4b 44 e5 |..`.......L..KD.|
000002b0 ec f3 e0 48 33 b8 a9 74 78 14 03 03 00 01 01 16 |...H3..tx.......|
000002c0 03 03 00 28 00 00 00 00 00 00 00 00 e6 a6 db ee |...(............|
000002d0 7d fb 48 9f 81 a6 78 6a db a1 9a bb c8 da 7b b2 |}.H...xj......{.|
000002e0 6a 01 66 fb 85 a7 2f 35 40 77 b6 b2 |j.f.../5@w..|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 28 2f 40 03 cf 5a |..........(/@..Z|
00000010 76 6c 87 87 8d 99 4c e8 76 73 6a 62 1d a5 31 bc |vl....L.vsjb..1.|
00000020 2e 7e 23 8c 50 bf 07 b9 13 53 4a 59 a0 9b 74 b7 |.~#.P....SJY..t.|
00000030 53 21 2d |S!-|
00000000 14 03 03 00 01 01 16 03 03 00 28 b3 9c 30 b6 a2 |..........(..0..|
00000010 cb cf 75 38 10 e7 80 39 0e 87 39 9c d9 da 2c 53 |..u8...9..9...,S|
00000020 1a 64 2d 33 ff 21 25 e9 3c f2 ec 6d a4 59 f4 30 |.d-3.!%.<..m.Y.0|
00000030 ea 41 24 |.A$|
>>> Flow 5 (client to server)
00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 83 69 b1 |..............i.|
00000010 20 19 eb db d4 58 e7 f1 5a 95 b0 d3 9d 3b 74 ad | ....X..Z....;t.|
00000020 bc 94 c4 15 03 03 00 1a 00 00 00 00 00 00 00 02 |................|
00000030 7d 89 89 25 40 be 0d fc 24 d0 ff 5a 0f 24 5d f2 |}..%@...$..Z.$].|
00000040 a3 ab |..|
00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 65 72 8f |.............er.|
00000010 4a 5f 08 c1 f9 37 5d 30 bc c6 e6 5f a8 23 35 69 |J_...7]0..._.#5i|
00000020 d3 3c 7a 15 03 03 00 1a 00 00 00 00 00 00 00 02 |.<z.............|
00000030 b0 48 2e 2e ed 4d 9c db 3a fc ff e6 57 83 fc 90 |.H...M..:...W...|
00000040 aa 78 |.x|