OLD | NEW |
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 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 | 7 |
8 #include "cert.h" | 8 #include "cert.h" |
9 #include "ssl.h" | 9 #include "ssl.h" |
10 #include "sslimpl.h" | 10 #include "sslimpl.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 } | 367 } |
368 if (rv < 0) { | 368 if (rv < 0) { |
369 return ss->recvdCloseNotify ? 0 : rv; | 369 return ss->recvdCloseNotify ? 0 : rv; |
370 } | 370 } |
371 | 371 |
372 /* If we kicked off a false start in ssl3_HandleServerHelloDone, break | 372 /* If we kicked off a false start in ssl3_HandleServerHelloDone, break |
373 * out of this loop early without finishing the handshake. | 373 * out of this loop early without finishing the handshake. |
374 */ | 374 */ |
375 if (ss->opt.enableFalseStart) { | 375 if (ss->opt.enableFalseStart) { |
376 ssl_GetSSL3HandshakeLock(ss); | 376 ssl_GetSSL3HandshakeLock(ss); |
377 » canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher || | 377 » canFalseStart = ss->ssl3.hs.canFalseStart; |
378 » » » ss->ssl3.hs.ws == wait_new_session_ticket) && | |
379 » » ssl3_CanFalseStart(ss); | |
380 ssl_ReleaseSSL3HandshakeLock(ss); | 378 ssl_ReleaseSSL3HandshakeLock(ss); |
381 } | 379 } |
382 } while (ss->ssl3.hs.ws != idle_handshake && | 380 } while (ss->ssl3.hs.ws != idle_handshake && |
383 !canFalseStart && | 381 !canFalseStart && |
384 ss->gs.buf.len == 0); | 382 ss->gs.buf.len == 0); |
385 | 383 |
386 ss->gs.readOffset = 0; | 384 ss->gs.readOffset = 0; |
387 ss->gs.writeOffset = ss->gs.buf.len; | 385 ss->gs.writeOffset = ss->gs.buf.len; |
388 return 1; | 386 return 1; |
389 } | 387 } |
(...skipping 14 matching lines...) Expand all Loading... |
404 { | 402 { |
405 int rv; | 403 int rv; |
406 | 404 |
407 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); | 405 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); |
408 do { | 406 do { |
409 rv = ssl3_GatherCompleteHandshake(ss, flags); | 407 rv = ssl3_GatherCompleteHandshake(ss, flags); |
410 } while (rv > 0 && ss->gs.buf.len == 0); | 408 } while (rv > 0 && ss->gs.buf.len == 0); |
411 | 409 |
412 return rv; | 410 return rv; |
413 } | 411 } |
OLD | NEW |