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

Unified Diff: net/third_party/nss/ssl/ssl3ext.c

Issue 240633006: Move signature_algorithm extension to the end in NSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include name of server in comment 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 side-by-side diff with in-line comments
Download patch
Index: net/third_party/nss/ssl/ssl3ext.c
diff --git a/net/third_party/nss/ssl/ssl3ext.c b/net/third_party/nss/ssl/ssl3ext.c
index 6f3fe2fa65191b6fd667c991e8c2c7df3381e063..72f5bdfc2408d3dd6a9acd3feb9025d7f884d23a 100644
--- a/net/third_party/nss/ssl/ssl3ext.c
+++ b/net/third_party/nss/ssl/ssl3ext.c
@@ -285,10 +285,6 @@ static const
ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = {
{ ssl_server_name_xtn, &ssl3_SendServerNameXtn },
{ ssl_renegotiation_info_xtn, &ssl3_SendRenegotiationInfoXtn },
-#ifdef NSS_ENABLE_ECC
- { ssl_elliptic_curves_xtn, &ssl3_SendSupportedCurvesXtn },
- { ssl_ec_point_formats_xtn, &ssl3_SendSupportedPointFormatsXtn },
-#endif
{ ssl_session_ticket_xtn, &ssl3_SendSessionTicketXtn },
{ ssl_next_proto_nego_xtn, &ssl3_ClientSendNextProtoNegoXtn },
{ ssl_app_layer_protocol_xtn, &ssl3_ClientSendAppProtoXtn },
@@ -297,7 +293,14 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = {
{ ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn },
{ ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn },
{ ssl_signed_certificate_timestamp_xtn,
- &ssl3_ClientSendSignedCertTimestampXtn }
+ &ssl3_ClientSendSignedCertTimestampXtn },
+ /* WebSphere Application Server 7.0 is intolerant to the last extension
+ * being zero-length. ECC extensions are non-empty and not dropped until
+ * fallback to SSL3, at which point all extensions are gone. */
+#ifdef NSS_ENABLE_ECC
+ { ssl_elliptic_curves_xtn, &ssl3_SendSupportedCurvesXtn },
+ { ssl_ec_point_formats_xtn, &ssl3_SendSupportedPointFormatsXtn },
wtc 2014/04/28 23:18:07 Nit: please remove the trailing comma. An older ve
davidben 2014/04/28 23:35:02 Done. Although it would get still be unhappy if NS
wtc 2014/04/28 23:38:33 I see. In that case I suggest moving ssl_server_na
davidben 2014/04/28 23:50:38 Heh. Alright, I'll do that tomorrow and mirror it
wtc 2014/04/29 12:16:42 I don't think this will be a problem. However, we
davidben 2014/04/30 20:49:37 Alright, signature_algorithms then. :-P
+#endif
/* any extra entries will appear as { 0, NULL } */
};
@@ -2347,9 +2350,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientHelloLength)
}
extensionLength = 512 - recordLength;
- /* Extensions take at least four bytes to encode. */
- if (extensionLength < 4) {
- extensionLength = 4;
+ /* Extensions take at least four bytes to encode. Always include at least
+ * one byte of data if including the extension. WebSphere Application Server
+ * 7.0 is intolerant to the last extension being zero-length. */
+ if (extensionLength < 4 + 1) {
+ extensionLength = 4 + 1;
}
return extensionLength;

Powered by Google App Engine
This is Rietveld 408576698