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

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

Issue 10777021: Cap the record layer version number of TLS ClientHello to TLS 1.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Make the changes rsleevi suggested. Add the patch file. Created 8 years, 5 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/recordlayerversion.patch ('k') | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * DTLS Protocol 2 * DTLS Protocol
3 * 3 *
4 * ***** BEGIN LICENSE BLOCK ***** 4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 else if (ss->ssl3.pwSpec->epoch == epoch) 827 else if (ss->ssl3.pwSpec->epoch == epoch)
828 cwSpec = ss->ssl3.pwSpec; 828 cwSpec = ss->ssl3.pwSpec;
829 else 829 else
830 cwSpec = NULL; 830 cwSpec = NULL;
831 } else { 831 } else {
832 cwSpec = ss->ssl3.cwSpec; 832 cwSpec = ss->ssl3.cwSpec;
833 } 833 }
834 834
835 if (cwSpec) { 835 if (cwSpec) {
836 rv = ssl3_CompressMACEncryptRecord(cwSpec, ss->sec.isServer, PR_TRUE, 836 rv = ssl3_CompressMACEncryptRecord(cwSpec, ss->sec.isServer, PR_TRUE,
837 » » » » » type, pIn, contentLen, wrBuf); 837 » » » » » PR_FALSE, type, pIn, contentLen,
838 » » » » » wrBuf);
838 } else { 839 } else {
839 PR_NOT_REACHED("Couldn't find a cipher spec matching epoch"); 840 PR_NOT_REACHED("Couldn't find a cipher spec matching epoch");
840 PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); 841 PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
841 } 842 }
842 ssl_ReleaseSpecReadLock(ss); /************************************/ 843 ssl_ReleaseSpecReadLock(ss); /************************************/
843 844
844 return rv; 845 return rv;
845 } 846 }
846 847
847 /* Start a timer 848 /* Start a timer
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 desired = PR_MillisecondsToInterval(ss->ssl3.hs.rtTimeoutMs); 1156 desired = PR_MillisecondsToInterval(ss->ssl3.hs.rtTimeoutMs);
1156 if (elapsed > desired) { 1157 if (elapsed > desired) {
1157 /* Timer expired */ 1158 /* Timer expired */
1158 *timeout = PR_INTERVAL_NO_WAIT; 1159 *timeout = PR_INTERVAL_NO_WAIT;
1159 } else { 1160 } else {
1160 *timeout = desired - elapsed; 1161 *timeout = desired - elapsed;
1161 } 1162 }
1162 1163
1163 return SECSuccess; 1164 return SECSuccess;
1164 } 1165 }
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/recordlayerversion.patch ('k') | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698