From ee7e443389f7c8aabc58d49e42880b96f0955361 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Wed, 31 Oct 2018 12:14:51 -0400 Subject: crypto/tls: advertise and accept rsa_pss_rsae signature algorithms crypto/x509 already supports PSS signatures (with rsaEncryption OID), and crypto/tls support was added in CL 79736. Advertise support for the algorithms and accept them as a peer. Note that this is about PSS signatures from regular RSA public keys. RSA-PSS only public keys (with RSASSA-PSS OID) are supported in neither crypto/tls nor crypto/x509. See RFC 8446, Section 4.2.3. testdata/Server-TLSv12-ClientAuthRequested* got modified because the CertificateRequest carries the supported signature algorithms. The net/smtp tests changed because 512 bits keys are too small for PSS. Based on Peter Wu's CL 79738, who did all the actual work in CL 79736. Updates #9671 Change-Id: I4a31e9c6e152ff4c50a5c8a274edd610d5fff231 Reviewed-on: https://go-review.googlesource.com/c/146258 Run-TryBot: Filippo Valsorda TryBot-Result: Gobot Gobot Reviewed-by: Adam Langley --- .../testdata/Client-TLSv12-ClientCert-RSA-RSAPSS | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS (limited to 'src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS') diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS new file mode 100644 index 0000000000..46137afb2b --- /dev/null +++ b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSAPSS @@ -0,0 +1,130 @@ +>>> Flow 1 (client to server) +00000000 16 03 01 00 a6 01 00 00 a2 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 2c cc a8 |.............,..| +00000030 cc a9 c0 2f c0 2b c0 30 c0 2c c0 27 c0 13 c0 23 |.../.+.0.,.'...#| +00000040 c0 09 c0 14 c0 0a 00 9c 00 9d 00 3c 00 2f 00 35 |...........<./.5| +00000050 c0 12 00 0a 00 05 c0 11 c0 07 01 00 00 4d 00 05 |.............M..| +00000060 00 05 01 00 00 00 00 00 0a 00 0a 00 08 00 1d 00 |................| +00000070 17 00 18 00 19 00 0b 00 02 01 00 00 0d 00 18 00 |................| +00000080 16 08 04 08 05 08 06 04 01 04 03 05 01 05 03 06 |................| +00000090 01 06 03 02 01 02 03 ff 01 00 01 00 00 12 00 00 |................| +000000a0 00 2b 00 07 06 03 03 03 02 03 01 |.+.........| +>>> Flow 2 (server to client) +00000000 16 03 03 00 59 02 00 00 55 03 03 47 3c 4e 01 1f |....Y...U..G>> 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.......\.| +00000020 c1 89 65 83 55 6f dc 0b c9 b9 93 9f e9 bc 30 0d |..e.Uo........0.| +00000030 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 12 31 |..*.H........0.1| +00000040 10 30 0e 06 03 55 04 0a 13 07 41 63 6d 65 20 43 |.0...U....Acme C| +00000050 6f 30 1e 17 0d 31 36 30 38 31 37 32 31 35 32 33 |o0...16081721523| +00000060 31 5a 17 0d 31 37 30 38 31 37 32 31 35 32 33 31 |1Z..170817215231| +00000070 5a 30 12 31 10 30 0e 06 03 55 04 0a 13 07 41 63 |Z0.1.0...U....Ac| +00000080 6d 65 20 43 6f 30 81 9f 30 0d 06 09 2a 86 48 86 |me Co0..0...*.H.| +00000090 f7 0d 01 01 01 05 00 03 81 8d 00 30 81 89 02 81 |...........0....| +000000a0 81 00 ba 6f aa 86 bd cf bf 9f f2 ef 5c 94 60 78 |...o........\.`x| +000000b0 6f e8 13 f2 d1 96 6f cd d9 32 6e 22 37 ce 41 f9 |o.....o..2n"7.A.| +000000c0 ca 5d 29 ac e1 27 da 61 a2 ee 81 cb 10 c7 df 34 |.])..'.a.......4| +000000d0 58 95 86 e9 3d 19 e6 5c 27 73 60 c8 8d 78 02 f4 |X...=..\'s`..x..| +000000e0 1d a4 98 09 a3 19 70 69 3c 25 62 66 2a ab 22 23 |......pi<%bf*."#| +000000f0 c5 7b 85 38 4f 2e 09 73 32 a7 bd 3e 9b ad ca 84 |.{.8O..s2..>....| +00000100 07 e6 0f 3a ff 77 c5 9d 41 85 00 8a b6 9b ee b0 |...:.w..A.......| +00000110 a4 3f 2d 4c 4c e6 42 3e bb 51 c8 dd 48 54 f4 0c |.?-LL.B>.Q..HT..| +00000120 8e 47 02 03 01 00 01 a3 46 30 44 30 0e 06 03 55 |.G......F0D0...U| +00000130 1d 0f 01 01 ff 04 04 03 02 05 a0 30 13 06 03 55 |...........0...U| +00000140 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03 01 |.%..0...+.......| +00000150 30 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0f |0...U.......0.0.| +00000160 06 03 55 1d 11 04 08 30 06 87 04 7f 00 00 01 30 |..U....0.......0| +00000170 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 03 81 |...*.H..........| +00000180 81 00 46 ab 44 a2 fb 28 54 f8 5a 67 f8 62 94 f1 |..F.D..(T.Zg.b..| +00000190 9a b2 18 9e f2 b1 de 1d 7e 6f 76 95 a9 ba e7 5d |........~ov....]| +000001a0 a8 16 6c 9c f7 09 d3 37 e4 4b 2b 36 7c 01 ad 41 |..l....7.K+6|..A| +000001b0 d2 32 d8 c3 d2 93 f9 10 6b 8e 95 b9 2c 17 8a a3 |.2......k...,...| +000001c0 44 48 bc 59 13 83 16 04 88 a4 81 5c 25 0d 98 0c |DH.Y.......\%...| +000001d0 ac 11 b1 28 56 be 1d cd 61 62 84 09 bf d6 80 c6 |...(V...ab......| +000001e0 45 8d 82 2c b4 d8 83 9b db c9 22 b7 2a 12 11 7b |E..,......".*..{| +000001f0 fa 02 3b c1 c9 ff ea c9 9d a8 49 d3 95 d7 d5 0e |..;.......I.....| +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 a6 e4 d6 69 42 65 73 |............iBes| +00000240 a9 a8 c3 d7 90 1a e2 c2 14 3d 0c 8d 68 28 78 1b |.........=..h(x.| +00000250 0d d0 63 85 59 4c 2c c0 4d 9a f1 2f e4 8c fa b2 |..c.YL,.M../....| +00000260 fc 26 62 46 3e b3 50 12 55 44 93 70 37 97 c8 b6 |.&bF>.P.UD.p7...| +00000270 ce 04 27 67 e0 35 ff bb 3e 5b f3 77 58 5e 7f 53 |..'g.5..>[.wX^.S| +00000280 a6 19 fd 36 ad c4 96 48 f6 9e 15 e7 ff 9a d1 7b |...6...H.......{| +00000290 b5 3b d5 39 c8 c1 df c9 dc d3 f8 30 97 4e 42 3a |.;.9.......0.NB:| +000002a0 fc 98 bf 69 64 08 7d a8 d4 2c 06 88 69 b8 b6 cb |...id.}..,..i...| +000002b0 c3 b5 e1 f3 ad 43 dd 59 68 14 03 03 00 01 01 16 |.....C.Yh.......| +000002c0 03 03 00 28 00 00 00 00 00 00 00 00 c6 06 1e 72 |...(...........r| +000002d0 81 94 ee 05 bc f2 6f 13 46 e8 03 f3 b9 57 ca 8c |......o.F....W..| +000002e0 14 ac 8e ab 36 6d aa 02 51 e7 12 43 |....6m..Q..C| +>>> Flow 4 (server to client) +00000000 14 03 03 00 01 01 16 03 03 00 28 8c 12 31 b7 59 |..........(..1.Y| +00000010 c1 9b 7f 03 c5 dd ec f9 94 12 b6 7e 5b 05 66 60 |...........~[.f`| +00000020 de 54 1f 0c 62 ac 27 8e 3f f8 00 3e 6a 9b d6 f8 |.T..b.'.?..>j...| +00000030 05 e3 57 |..W| +>>> Flow 5 (client to server) +00000000 17 03 03 00 1e 00 00 00 00 00 00 00 01 66 0d d6 |.............f..| +00000010 a4 72 eb a6 81 50 e3 a6 58 44 1c e7 3e a3 3c 30 |.r...P..XD..>.<0| +00000020 be 58 58 15 03 03 00 1a 00 00 00 00 00 00 00 02 |.XX.............| +00000030 d7 0d af 5b 93 61 ff 24 35 a4 6f cd 98 0a fc a8 |...[.a.$5.o.....| +00000040 35 cb |5.| -- cgit v1.3