mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-04 12:37:35 +03:00
crypto/tls: disable RSA-PSS in TLS 1.2 again
Signing with RSA-PSS can uncover faulty crypto.Signer implementations, and it can fail for (broken) small keys. We'll have to take that breakage eventually, but it would be nice for it to be opt-out at first. TLS 1.3 requires RSA-PSS and is opt-out in Go 1.13. Instead of making a TLS 1.3 opt-out influence a TLS 1.2 behavior, let's wait to add RSA-PSS to TLS 1.2 until TLS 1.3 is on without opt-out. Note that since the Client Hello is sent before a protocol version is selected, we have to advertise RSA-PSS there to support TLS 1.3. That means that we still support RSA-PSS on the client in TLS 1.2 for verifying server certificates, which is fine, as all issues arise on the signing side. We have to be careful not to pick (or consider available) RSA-PSS on the client for client certificates, though. We'd expect tests to change only in TLS 1.2: * the server won't pick PSS to sign the key exchange (Server-TLSv12-* w/ RSA, TestHandshakeServerRSAPSS); * the server won't advertise PSS in CertificateRequest (Server-TLSv12-ClientAuthRequested*, TestClientAuth); * and the client won't pick PSS for its CertificateVerify (Client-TLSv12-ClientCert-RSA-*, TestHandshakeClientCertRSAPSS, Client-TLSv12-Renegotiate* because "R" requests a client cert). Client-TLSv13-ClientCert-RSA-RSAPSS was updated because of a fix in the test. This effectively reverts 88343530720a52c96b21f2bd5488c8fb607605d7. Testing was made more complex by the undocumented semantics of OpenSSL's -[client_]sigalgs (see openssl/openssl#9172). Updates #32425 Change-Id: Iaddeb2df1f5c75cd090cc8321df2ac8e8e7db349 Reviewed-on: https://go-review.googlesource.com/c/go/+/182339 Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
parent
8e5858c5e1
commit
9a45e56dc1
39 changed files with 1715 additions and 1700 deletions
92
testdata/Client-TLSv12-ClientCert-RSA-ECDSA
vendored
92
testdata/Client-TLSv12-ClientCert-RSA-ECDSA
vendored
|
@ -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 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..~........|
|
||||
00000000 16 03 03 00 59 02 00 00 55 03 03 59 e6 a5 3d 5a |....Y...U..Y..=Z|
|
||||
00000010 bf 25 a3 16 e7 e3 da cb ac b7 11 09 0a 1a 8a c5 |.%..............|
|
||||
00000020 33 a2 a6 58 12 27 cd 52 15 28 c9 20 23 9a f5 d3 |3..X.'.R.(. #...|
|
||||
00000030 d4 df 49 1d 01 87 12 36 03 c6 36 17 39 d0 db 62 |..I....6..6.9..b|
|
||||
00000040 22 48 7e 57 20 ab a3 7c b0 53 7e f1 c0 09 00 00 |"H~W ..|.S~.....|
|
||||
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....|
|
||||
|
@ -55,23 +55,23 @@
|
|||
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 |.....|
|
||||
00000270 2a 16 03 03 00 b6 0c 00 00 b2 03 00 1d 20 a7 6b |*............ .k|
|
||||
00000280 75 97 e7 04 a7 19 99 af c7 73 72 82 59 7d 16 46 |u........sr.Y}.F|
|
||||
00000290 de 80 c2 d3 36 c7 e8 42 89 ca 8d db 11 39 04 03 |....6..B.....9..|
|
||||
000002a0 00 8a 30 81 87 02 41 73 4f fe e2 00 9d bf 60 0a |..0...AsO.....`.|
|
||||
000002b0 36 0b 97 8a fc 3e 8c 1d ac ff a2 0b 7a dc 8d 2f |6....>......z../|
|
||||
000002c0 d7 90 da 18 a0 14 8a 7c 51 4c a6 ae ec 13 ee 5e |.......|QL.....^|
|
||||
000002d0 1a 60 aa 2f 5a d2 05 48 fb bb bb 3a 1a dc fa 21 |.`./Z..H...:...!|
|
||||
000002e0 df 7b 6d 83 23 d6 62 0f 02 42 01 7f 5a 36 6d f4 |.{m.#.b..B..Z6m.|
|
||||
000002f0 0d f5 d0 6f d9 71 52 f8 eb e3 ed 7c 40 fd 64 14 |...o.qR....|@.d.|
|
||||
00000300 c1 31 4d 4b 78 70 5d 9f 61 18 3b 87 01 10 94 e5 |.1MKxp].a.;.....|
|
||||
00000310 7b 83 34 2d cd 90 50 db 10 62 8d 36 40 45 20 c0 |{.4-..P..b.6@E .|
|
||||
00000320 db ce de 5e b3 63 de 60 db bb fe be 16 03 03 00 |...^.c.`........|
|
||||
00000330 3a 0d 00 00 36 03 01 02 40 00 2e 04 03 05 03 06 |:...6...@.......|
|
||||
00000340 03 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 08 |................|
|
||||
00000350 06 04 01 05 01 06 01 03 03 02 03 03 01 02 01 03 |................|
|
||||
00000360 02 02 02 04 02 05 02 06 02 00 00 16 03 03 00 04 |................|
|
||||
00000370 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.......\.|
|
||||
|
@ -108,31 +108,31 @@
|
|||
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..?........|
|
||||
00000230 88 0f 00 00 84 04 01 00 80 88 59 ec 09 a4 c9 5e |..........Y....^|
|
||||
00000240 37 b4 e3 04 71 52 1a 5a 6d d6 9b f6 09 14 01 c2 |7...qR.Zm.......|
|
||||
00000250 3e 07 19 2f ec 15 d9 5b 12 6a 6e de 78 a3 ac 58 |>../...[.jn.x..X|
|
||||
00000260 40 44 f2 66 0a 12 a5 62 37 8b af 5a 3a 20 be f2 |@D.f...b7..Z: ..|
|
||||
00000270 6f 43 c8 00 69 21 c8 fd b0 cf 00 74 c3 96 a0 8b |oC..i!.....t....|
|
||||
00000280 6f ce c1 09 e6 90 1d 8e 53 40 b8 44 83 b9 46 9c |o.......S@.D..F.|
|
||||
00000290 78 3b c1 0a 36 68 a5 04 e8 b5 ed 6d 7d 09 21 8c |x;..6h.....m}.!.|
|
||||
000002a0 0e 00 0c 5e d0 2b 47 c9 f6 31 f6 8f 7b b6 2d 8d |...^.+G..1..{.-.|
|
||||
000002b0 ec 4e c2 0d 08 c5 1b 26 b6 14 03 03 00 01 01 16 |.N.....&........|
|
||||
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..|
|
||||
000002d0 00 00 00 00 e7 64 7d 04 bb bf dd 2a ac fd 96 81 |.....d}....*....|
|
||||
000002e0 25 d8 3e 6c 1d 53 c7 79 31 4d 13 c3 71 d3 da c0 |%.>l.S.y1M..q...|
|
||||
000002f0 f8 74 11 bb 6b 9d 62 66 ed f0 97 ab 43 fe 12 cb |.t..k.bf....C...|
|
||||
00000300 da 8d c2 4b |...K|
|
||||
>>> 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|
|
||||
00000000 14 03 03 00 01 01 16 03 03 00 40 35 ee 36 65 9a |..........@5.6e.|
|
||||
00000010 e5 ac c7 30 18 b6 ff f9 fd fa 66 88 a7 73 be ba |...0......f..s..|
|
||||
00000020 d5 89 59 26 cf 2d 8d 31 48 f0 fb 09 c1 66 ef eb |..Y&.-.1H....f..|
|
||||
00000030 94 30 b7 47 71 a1 cb 03 34 37 14 f5 76 14 13 a9 |.0.Gq...47..v...|
|
||||
00000040 6f d7 4d 59 c1 63 f8 db 8b 74 36 |o.MY.c...t6|
|
||||
>>> 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.`|
|
||||
00000010 00 00 00 00 00 19 16 39 bc a3 30 b5 1d ae e5 a9 |.......9..0.....|
|
||||
00000020 74 89 1e d1 77 86 8f 85 55 fa af cb 0a 94 45 f4 |t...w...U.....E.|
|
||||
00000030 a9 fa 21 c5 54 15 03 03 00 30 00 00 00 00 00 00 |..!.T....0......|
|
||||
00000040 00 00 00 00 00 00 00 00 00 00 40 17 27 41 8c ae |..........@.'A..|
|
||||
00000050 74 59 34 f0 2e 72 34 4e 98 6e d8 da 17 07 b3 14 |tY4..r4N.n......|
|
||||
00000060 d8 c8 2c ad b6 3e 44 5a 3e d7 |..,..>DZ>.|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue