Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: net/third_party/nss/patches/reorderextensions.patch

Issue 240633006: Move signature_algorithm extension to the end in NSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Match other patches Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 diff --git a/nss/lib/ssl/ssl3ext.c b/nss/lib/ssl/ssl3ext.c
2 index 6f3fe2f..a17d864 100644
3 --- a/nss/lib/ssl/ssl3ext.c
4 +++ b/nss/lib/ssl/ssl3ext.c
5 @@ -285,10 +285,6 @@ static const
6 ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = {
7 { ssl_server_name_xtn, &ssl3_SendServerNameXtn },
8 { ssl_renegotiation_info_xtn, &ssl3_SendRenegotiationInfoXtn },
9 -#ifdef NSS_ENABLE_ECC
10 - { ssl_elliptic_curves_xtn, &ssl3_SendSupportedCurvesXtn },
11 - { ssl_ec_point_formats_xtn, &ssl3_SendSupportedPointFormatsXtn },
12 -#endif
13 { ssl_session_ticket_xtn, &ssl3_SendSessionTicketXtn },
14 { ssl_next_proto_nego_xtn, &ssl3_ClientSendNextProtoNegoXtn },
15 { ssl_app_layer_protocol_xtn, &ssl3_ClientSendAppProtoXtn },
16 @@ -297,7 +293,14 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTE NSIONS] = {
17 { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn },
18 { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn },
19 { ssl_signed_certificate_timestamp_xtn,
20 - &ssl3_ClientSendSignedCertTimestampXtn }
21 + &ssl3_ClientSendSignedCertTimestampXtn },
22 + /* Some servers are intolerant to the last extension being zero-length. ECC
23 + * extensions are non-empty and not dropped until fallback to SSL3, at whic h
24 + * point all extensions are gone. */
25 +#ifdef NSS_ENABLE_ECC
26 + { ssl_elliptic_curves_xtn, &ssl3_SendSupportedCurvesXtn },
27 + { ssl_ec_point_formats_xtn, &ssl3_SendSupportedPointFormatsXtn },
28 +#endif
29 /* any extra entries will appear as { 0, NULL } */
30 };
31
32 @@ -2347,9 +2350,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientH elloLength)
33 }
34
35 extensionLength = 512 - recordLength;
36 - /* Extensions take at least four bytes to encode. */
37 - if (extensionLength < 4) {
38 - extensionLength = 4;
39 + /* Extensions take at least four bytes to encode. Always include at least
40 + * one byte of data if including the extension. Some servers are intolerant
41 + * to the last extension being empty. */
42 + if (extensionLength < 4 + 1) {
43 + extensionLength = 4 + 1;
44 }
45
46 return extensionLength;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698