crypto/tls: advertise support for SHA-512 signatures in 1.2

This is the equivalent change to 1c105980 but for SHA-512.

SHA-512 certificates are already supported by default since b53bb2ca,
but some servers will refuse connections if the algorithm is not
advertised in the overloaded signatureAndHash extension (see 09b238f1).

This required adding support for SHA-512 signatures on CertificateVerify
and ServerKeyExchange messages, because of said overloading.

Some testdata/Client-TLSv1{0,1} files changed because they send a 1.2
ClientHello even if the server picks a lower version.

Closes #22422

Change-Id: I16282d03a3040260d203711ec21e6b20a0e1e105
Reviewed-on: https://go-review.googlesource.com/74950
Run-TryBot: Filippo Valsorda <hi@filippo.io>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
Filippo Valsorda 2017-10-31 19:43:05 -04:00 committed by Adam Langley
parent 90f8fc90bd
commit ca44103d11
48 changed files with 1902 additions and 2108 deletions

View file

@ -1,7 +1,7 @@
>>> Flow 1 (client to server)
00000000 16 03 01 00 73 01 00 00 6f 03 03 f0 4f 82 cc 2a |....s...o...O..*|
00000010 27 0b 7f 2e e4 af 6d ba 4e fe 61 99 fc 0a 44 ee |'.....m.N.a...D.|
00000020 c0 4e 7b 3a 7c f0 6d 12 b7 7d 9e 00 00 04 c0 0a |.N{:|.m..}......|
00000000 16 03 01 00 73 01 00 00 6f 03 03 8b 7a 0c fa 8b |....s...o...z...|
00000010 92 b9 b6 d6 b8 93 50 29 07 2e 8e 70 9b a1 55 65 |......P)...p..Ue|
00000020 ba 05 9d 74 2e 7e a6 2a 10 e1 3c 00 00 04 c0 0a |...t.~.*..<.....|
00000030 00 ff 01 00 00 42 00 0b 00 04 03 00 01 02 00 0a |.....B..........|
00000040 00 0a 00 08 00 1d 00 17 00 19 00 18 00 0d 00 20 |............... |
00000050 00 1e 06 01 06 02 06 03 05 01 05 02 05 03 04 01 |................|
@ -47,36 +47,36 @@
00000240 7b 6a 0f 39 95 12 07 8f 2a 16 03 03 00 b7 0c 00 |{j.9....*.......|
00000250 00 b3 03 00 1d 20 2f e5 7d a3 47 cd 62 43 15 28 |..... /.}.G.bC.(|
00000260 da ac 5f bb 29 07 30 ff f6 84 af c4 cf c2 ed 90 |.._.).0.........|
00000270 99 5f 58 cb 3b 74 05 03 00 8b 30 81 88 02 42 01 |._X.;t....0...B.|
00000280 2d d4 82 80 01 6b e6 8c 6a 2a b3 09 1b 0d 86 e6 |-....k..j*......|
00000290 62 92 85 46 d9 e3 b2 e9 f1 5e 77 c2 27 fd 2b 68 |b..F.....^w.'.+h|
000002a0 6a e1 3d e2 42 d2 86 96 42 b1 3b 50 7b e2 2c 34 |j.=.B...B.;P{.,4|
000002b0 d3 e7 f6 14 89 48 eb 5c 9a 98 98 ab f3 db 85 06 |.....H.\........|
000002c0 cb 02 42 00 df 42 94 63 a5 ff 43 a5 20 5d 83 09 |..B..B.c..C. ]..|
000002d0 88 7d 10 ff ec 32 33 28 1d 43 b2 d2 bf 39 0c 63 |.}...23(.C...9.c|
000002e0 9a c0 f8 0e 9f 71 a7 9a 5d 27 1a 5c f2 36 80 b3 |.....q..]'.\.6..|
000002f0 71 0f d3 c0 fd 0d 5d 02 90 c4 9d 90 db 74 ad f6 |q.....]......t..|
00000300 22 8f 6b 9d 55 16 03 03 00 04 0e 00 00 00 |".k.U.........|
00000270 99 5f 58 cb 3b 74 06 03 00 8b 30 81 88 02 42 00 |._X.;t....0...B.|
00000280 cb 8e af 48 f8 79 66 5b 9a 52 8d 67 ec 13 02 a5 |...H.yf[.R.g....|
00000290 ab 77 9e 15 17 c2 4e ff 7a b4 5b 53 1a 16 22 3f |.w....N.z.[S.."?|
000002a0 b8 83 40 99 64 67 b3 54 19 29 6b 2d a8 3c 63 44 |..@.dg.T.)k-.<cD|
000002b0 d5 45 20 3f 9a 8e b9 71 d6 7a 85 d5 aa 99 7f 02 |.E ?...q.z......|
000002c0 a8 02 42 00 c1 15 3b 9b 9d de eb 2e 63 52 35 b2 |..B...;.....cR5.|
000002d0 1e 63 b1 1a 20 58 e5 e7 6d b3 e8 c8 3d 0f af 98 |.c.. X..m...=...|
000002e0 4a 2a a0 f8 8e aa 2a f2 2a 1e 41 98 be 6f 6c bc |J*....*.*.A..ol.|
000002f0 ad 57 1d 2b 50 0b d9 47 d2 7a 62 08 a5 e5 28 44 |.W.+P..G.zb...(D|
00000300 a7 e2 eb 4a b8 16 03 03 00 04 0e 00 00 00 |...J..........|
>>> Flow 3 (client to server)
00000000 16 03 03 00 25 10 00 00 21 20 af 52 73 d4 46 4d |....%...! .Rs.FM|
00000010 bc 0e dd 56 1f 7f 72 ce 6c 99 b9 64 53 7d 53 8d |...V..r.l..dS}S.|
00000020 0c a4 75 8c 83 3b 4b 76 2d 4f 14 03 03 00 01 01 |..u..;Kv-O......|
00000030 16 03 03 00 40 a0 ef 9f 54 a8 ab 7c 5b 4a a1 b2 |....@...T..|[J..|
00000040 5d 5b 6a d7 a7 32 35 46 58 d0 ba 38 6f 94 6e 9a |][j..25FX..8o.n.|
00000050 41 16 82 ed 4d 39 c4 ff 06 bf 2c 67 47 70 56 4e |A...M9....,gGpVN|
00000060 c5 ac 7f a0 5d d9 89 82 7a d9 36 07 55 b3 20 f4 |....]...z.6.U. .|
00000070 b2 73 cf c3 7d |.s..}|
00000000 16 03 03 00 25 10 00 00 21 20 d2 c0 5b 2a f2 05 |....%...! ..[*..|
00000010 4d 57 b0 d0 8b 51 b0 7f 1f 71 8b d9 55 76 46 c9 |MW...Q...q..UvF.|
00000020 a8 40 44 2c a1 51 74 50 4a 22 14 03 03 00 01 01 |.@D,.QtPJ"......|
00000030 16 03 03 00 40 79 6d 1b bc e7 5b 5c 7b 99 62 2b |....@ym...[\{.b+|
00000040 4a 1a b2 0f 76 72 67 d1 ec 25 04 5f fb 25 f4 9c |J...vrg..%._.%..|
00000050 9c 47 bb b9 85 28 59 0c 0c 15 3f 86 a5 16 c8 ef |.G...(Y...?.....|
00000060 a4 e6 8e c0 96 37 47 5a c8 cd f2 90 41 9b 94 dc |.....7GZ....A...|
00000070 ec fe e2 df d4 |.....|
>>> Flow 4 (server to client)
00000000 14 03 03 00 01 01 16 03 03 00 40 00 00 00 00 00 |..........@.....|
00000010 00 00 00 00 00 00 00 00 00 00 00 73 5f db 9e 08 |...........s_...|
00000020 10 38 3b c0 95 6b dd fc 16 b2 d1 db 63 13 ca d5 |.8;..k......c...|
00000030 b5 be 5a 1d 74 b5 75 f3 a2 63 59 be a7 d0 ab 0d |..Z.t.u..cY.....|
00000040 d3 43 83 8a 1d 59 ed fd ea f0 b9 17 03 03 00 40 |.C...Y.........@|
00000010 00 00 00 00 00 00 00 00 00 00 00 8a 19 1e 82 d0 |................|
00000020 46 f4 79 8d 9b fd 55 25 a9 6b d8 30 b3 41 f8 df |F.y...U%.k.0.A..|
00000030 a5 f8 9d 4c fe cc e1 1c 62 70 cf 60 12 cb 14 3e |...L....bp.`...>|
00000040 86 e9 d1 bb 46 60 7d b5 74 5f f5 17 03 03 00 40 |....F`}.t_.....@|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 cf 20 4f 4f bf c4 00 05 1e ca 7f 6f 69 77 e9 52 |. OO.......oiw.R|
00000070 14 61 02 6d f1 c0 ad 7c 1a 34 cf b2 7a 58 4a 70 |.a.m...|.4..zXJp|
00000080 11 36 5f e9 21 62 cb eb 8f e7 11 04 bf 66 03 69 |.6_.!b.......f.i|
00000060 97 1c 70 9d cf 17 89 8c c7 ad 84 38 6e f5 c6 d1 |..p........8n...|
00000070 c8 6e b2 a2 69 27 9a 59 fb bc af c0 15 47 40 b9 |.n..i'.Y.....G@.|
00000080 e1 35 9b 37 50 9f 05 53 60 f8 f9 91 40 67 36 a8 |.5.7P..S`...@g6.|
00000090 15 03 03 00 30 00 00 00 00 00 00 00 00 00 00 00 |....0...........|
000000a0 00 00 00 00 00 f5 35 92 09 6c 45 c0 27 95 98 a9 |......5..lE.'...|
000000b0 86 56 53 1f a8 01 d5 0b 79 0e 91 15 3b 9a 07 21 |.VS.....y...;..!|
000000c0 cb ce f0 2b 6a |...+j|
000000a0 00 00 00 00 00 0f 90 a8 00 9e 0e 51 29 b5 96 da |...........Q)...|
000000b0 b1 0d 81 7b 71 ff c9 de f8 aa c4 bd e1 7d 0d 35 |...{q........}.5|
000000c0 b1 ed ae 20 3c |... <|