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

Side by Side Diff: net/third_party/nss/ssl/ssl3con.c

Issue 25868004: net: don't send resumption ClientHello records with versions > 0x0301. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add reference to Bugzilla bug. Created 7 years, 2 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
« no previous file with comments | « net/third_party/nss/patches/resumeclienthelloversion.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* 2 /*
3 * SSL3 Protocol 3 * SSL3 Protocol
4 * 4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public 5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 8
9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ 9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */
10 10
(...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 * all ciphertext into the pending ciphertext buffer. 2863 * all ciphertext into the pending ciphertext buffer.
2864 * ssl_SEND_FLAG_USE_EPOCH (for DTLS) 2864 * ssl_SEND_FLAG_USE_EPOCH (for DTLS)
2865 * Forces the use of the provided epoch 2865 * Forces the use of the provided epoch
2866 * ssl_SEND_FLAG_CAP_RECORD_VERSION 2866 * ssl_SEND_FLAG_CAP_RECORD_VERSION
2867 * Caps the record layer version number of TLS ClientHello to { 3, 1 } 2867 * Caps the record layer version number of TLS ClientHello to { 3, 1 }
2868 * (TLS 1.0). Some TLS 1.0 servers (which seem to use F5 BIG-IP) ignore 2868 * (TLS 1.0). Some TLS 1.0 servers (which seem to use F5 BIG-IP) ignore
2869 * ClientHello.client_version and use the record layer version number 2869 * ClientHello.client_version and use the record layer version number
2870 * (TLSPlaintext.version) instead when negotiating protocol versions. In 2870 * (TLSPlaintext.version) instead when negotiating protocol versions. In
2871 * addition, if the record layer version number of ClientHello is { 3, 2 } 2871 * addition, if the record layer version number of ClientHello is { 3, 2 }
2872 * (TLS 1.1) or higher, these servers reset the TCP connections. Set this 2872 * (TLS 1.1) or higher, these servers reset the TCP connections. Set this
2873 * flag to work around such servers. 2873 * flag to work around such servers.
wtc 2013/10/07 17:55:39 Please review this paragraph and make sure it is s
2874 */ 2874 */
2875 PRInt32 2875 PRInt32
2876 ssl3_SendRecord( sslSocket * ss, 2876 ssl3_SendRecord( sslSocket * ss,
2877 DTLSEpoch epoch, /* DTLS only */ 2877 DTLSEpoch epoch, /* DTLS only */
2878 SSL3ContentType type, 2878 SSL3ContentType type,
2879 const SSL3Opaque * pIn, /* input buffer */ 2879 const SSL3Opaque * pIn, /* input buffer */
2880 PRInt32 nIn, /* bytes of input */ 2880 PRInt32 nIn, /* bytes of input */
2881 PRInt32 flags) 2881 PRInt32 flags)
2882 { 2882 {
2883 sslBuffer * wrBuf = &ss->sec.writeBuf; 2883 sslBuffer * wrBuf = &ss->sec.writeBuf;
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after
5356 PORT_Assert(!maxBytes); 5356 PORT_Assert(!maxBytes);
5357 } 5357 }
5358 if (ss->ssl3.hs.sendingSCSV) { 5358 if (ss->ssl3.hs.sendingSCSV) {
5359 /* Since we sent the SCSV, pretend we sent empty RI extension. */ 5359 /* Since we sent the SCSV, pretend we sent empty RI extension. */
5360 TLSExtensionData *xtnData = &ss->xtnData; 5360 TLSExtensionData *xtnData = &ss->xtnData;
5361 xtnData->advertised[xtnData->numAdvertised++] = 5361 xtnData->advertised[xtnData->numAdvertised++] =
5362 ssl_renegotiation_info_xtn; 5362 ssl_renegotiation_info_xtn;
5363 } 5363 }
5364 5364
5365 flags = 0; 5365 flags = 0;
5366 if (!ss->firstHsDone && !requestingResume && !IS_DTLS(ss)) { 5366 if (!ss->firstHsDone && !IS_DTLS(ss)) {
wtc 2013/10/07 17:55:39 This change seems to imply that F5 BIG-IP does not
5367 flags |= ssl_SEND_FLAG_CAP_RECORD_VERSION; 5367 flags |= ssl_SEND_FLAG_CAP_RECORD_VERSION;
5368 } 5368 }
5369 rv = ssl3_FlushHandshake(ss, flags); 5369 rv = ssl3_FlushHandshake(ss, flags);
5370 if (rv != SECSuccess) { 5370 if (rv != SECSuccess) {
5371 return rv; /* error code set by ssl3_FlushHandshake */ 5371 return rv; /* error code set by ssl3_FlushHandshake */
5372 } 5372 }
5373 5373
5374 ss->ssl3.hs.ws = wait_server_hello; 5374 ss->ssl3.hs.ws = wait_server_hello;
5375 return rv; 5375 return rv;
5376 } 5376 }
(...skipping 7091 matching lines...) Expand 10 before | Expand all | Expand 10 after
12468 PORT_Free(ss->ssl3.hs.recvdFragments.buf); 12468 PORT_Free(ss->ssl3.hs.recvdFragments.buf);
12469 } 12469 }
12470 } 12470 }
12471 12471
12472 ss->ssl3.initialized = PR_FALSE; 12472 ss->ssl3.initialized = PR_FALSE;
12473 12473
12474 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); 12474 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE);
12475 } 12475 }
12476 12476
12477 /* End of ssl3con.c */ 12477 /* End of ssl3con.c */
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/resumeclienthelloversion.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698