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

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

Issue 23621040: Make SSL False Start work with asynchronous certificate validation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update the patch file 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/ssl/sslsecur.c ('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 /* 1 /*
2 * vtables (and methods that call through them) for the 4 types of 2 * vtables (and methods that call through them) for the 4 types of
3 * SSLSockets supported. Only one type is still supported. 3 * SSLSockets supported. Only one type is still supported.
4 * Various other functions. 4 * Various other functions.
5 * 5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public 6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #include "seccomon.h" 9 #include "seccomon.h"
10 #include "cert.h" 10 #include "cert.h"
(...skipping 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 ** but the initial handshake is blocked on write, or the 2450 ** but the initial handshake is blocked on write, or the
2451 ** client's first handshake record has not been written. 2451 ** client's first handshake record has not been written.
2452 ** The code should select on write, not read. 2452 ** The code should select on write, not read.
2453 */ 2453 */
2454 new_flags ^= PR_POLL_READ; /* don't select on read. */ 2454 new_flags ^= PR_POLL_READ; /* don't select on read. */
2455 new_flags |= PR_POLL_WRITE; /* do select on write. */ 2455 new_flags |= PR_POLL_WRITE; /* do select on write. */
2456 } 2456 }
2457 } else if (new_flags & PR_POLL_WRITE) { 2457 } else if (new_flags & PR_POLL_WRITE) {
2458 /* The caller is trying to write, but the handshake is 2458 /* The caller is trying to write, but the handshake is
2459 ** blocked waiting for data to read, and the first 2459 ** blocked waiting for data to read, and the first
2460 » » ** handshake has been sent. so do NOT to poll on write. 2460 » » ** handshake has been sent. So do NOT to poll on write
2461 » » ** unless we did false start.
2461 */ 2462 */
2462 » » new_flags ^= PR_POLL_WRITE; /* don't select on write. */ 2463 » » if (!(ss->version >= SSL_LIBRARY_VERSION_3_0 &&
2463 » » new_flags |= PR_POLL_READ;» /* do select on read. */ 2464 » » » ss->ssl3.hs.canFalseStart)) {
2465 » » » new_flags ^= PR_POLL_WRITE; /* don't select on write. */
2466 » » }
2467 » » new_flags |= PR_POLL_READ; /* do select on read. */
2464 } 2468 }
2465 } 2469 }
2466 } else if ((new_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) { 2470 } else if ((new_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) {
2467 *p_out_flags = PR_POLL_READ; /* it's ready already. */ 2471 *p_out_flags = PR_POLL_READ; /* it's ready already. */
2468 return new_flags; 2472 return new_flags;
2469 } else if ((ss->lastWriteBlocked) && (how_flags & PR_POLL_READ) && 2473 } else if ((ss->lastWriteBlocked) && (how_flags & PR_POLL_READ) &&
2470 (ss->pendingBuf.len != 0)) { /* write data waiting to be sent */ 2474 (ss->pendingBuf.len != 0)) { /* write data waiting to be sent */
2471 new_flags |= PR_POLL_WRITE; /* also select on write. */ 2475 new_flags |= PR_POLL_WRITE; /* also select on write. */
2472 } 2476 }
2473 2477
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 loser: 3125 loser:
3122 ssl_DestroySocketContents(ss); 3126 ssl_DestroySocketContents(ss);
3123 ssl_DestroyLocks(ss); 3127 ssl_DestroyLocks(ss);
3124 PORT_Free(ss); 3128 PORT_Free(ss);
3125 ss = NULL; 3129 ss = NULL;
3126 } 3130 }
3127 } 3131 }
3128 return ss; 3132 return ss;
3129 } 3133 }
3130 3134
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/sslsecur.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698