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

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

Issue 850008: ssl_SecureSend should not do handshake when the handshake wait state is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 10 years, 9 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/falsestart.patch ('k') | net/third_party/nss/ssl/sslsecur.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 * Gather (Read) entire SSL3 records from socket into buffer. 2 * Gather (Read) entire SSL3 records from socket into buffer.
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 * If it's application data, ss->gs.buf will not be empty upon return. 202 * If it's application data, ss->gs.buf will not be empty upon return.
203 */ 203 */
204 cText.type = (SSL3ContentType)ss->gs.hdr[0]; 204 cText.type = (SSL3ContentType)ss->gs.hdr[0];
205 cText.version = (ss->gs.hdr[1] << 8) | ss->gs.hdr[2]; 205 cText.version = (ss->gs.hdr[1] << 8) | ss->gs.hdr[2];
206 cText.buf = &ss->gs.inbuf; 206 cText.buf = &ss->gs.inbuf;
207 rv = ssl3_HandleRecord(ss, &cText, &ss->gs.buf); 207 rv = ssl3_HandleRecord(ss, &cText, &ss->gs.buf);
208 if (rv < 0) { 208 if (rv < 0) {
209 return ss->recvdCloseNotify ? 0 : rv; 209 return ss->recvdCloseNotify ? 0 : rv;
210 } 210 }
211 211
212 /* If we kicked off a false start in ssl3_HandleServerHelloDone, break
213 * out of this loop early without finishing the handshake.
214 */
212 if (ss->opt.enableFalseStart) { 215 if (ss->opt.enableFalseStart) {
213 ssl_GetSSL3HandshakeLock(ss); 216 ssl_GetSSL3HandshakeLock(ss);
214 canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher || 217 canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher ||
215 ss->ssl3.hs.ws == wait_new_session_ticket) && 218 ss->ssl3.hs.ws == wait_new_session_ticket) &&
216 ssl3_CanFalseStart(ss); 219 ssl3_CanFalseStart(ss);
217 ssl_ReleaseSSL3HandshakeLock(ss); 220 ssl_ReleaseSSL3HandshakeLock(ss);
218 } 221 }
219 } while (ss->ssl3.hs.ws != idle_handshake && 222 } while (ss->ssl3.hs.ws != idle_handshake &&
220 !canFalseStart && 223 !canFalseStart &&
221 ss->gs.buf.len == 0); 224 ss->gs.buf.len == 0);
(...skipping 19 matching lines...) Expand all
241 { 244 {
242 int rv; 245 int rv;
243 246
244 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); 247 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
245 do { 248 do {
246 rv = ssl3_GatherCompleteHandshake(ss, flags); 249 rv = ssl3_GatherCompleteHandshake(ss, flags);
247 } while (rv > 0 && ss->gs.buf.len == 0); 250 } while (rv > 0 && ss->gs.buf.len == 0);
248 251
249 return rv; 252 return rv;
250 } 253 }
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/falsestart.patch ('k') | net/third_party/nss/ssl/sslsecur.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698