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

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

Issue 1511123006: Uprev NSS (in libssl) to NSS 3.21 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated deps Created 5 years 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
« no previous file with comments | « net/third_party/nss/ssl/ssl3ext.c ('k') | net/third_party/nss/ssl/ssl3prot.h » ('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 * 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 SSL_TRC(30, ("%d: SSL3[%d]: EOF", SSL_GETPID(), ss->fd)); 64 SSL_TRC(30, ("%d: SSL3[%d]: EOF", SSL_GETPID(), ss->fd));
65 rv = 0; 65 rv = 0;
66 break; 66 break;
67 } else /* if (nb < 0) */ { 67 } else /* if (nb < 0) */ {
68 SSL_DBG(("%d: SSL3[%d]: recv error %d", SSL_GETPID(), ss->fd, 68 SSL_DBG(("%d: SSL3[%d]: recv error %d", SSL_GETPID(), ss->fd,
69 PR_GetError())); 69 PR_GetError()));
70 rv = SECFailure; 70 rv = SECFailure;
71 break; 71 break;
72 } 72 }
73 73
74 » PORT_Assert( nb <= gs->remainder ); 74 » PORT_Assert( (unsigned int)nb <= gs->remainder );
75 » if (nb > gs->remainder) { 75 » if ((unsigned int)nb > gs->remainder) {
76 /* ssl_DefRecv is misbehaving! this error is fatal to SSL. */ 76 /* ssl_DefRecv is misbehaving! this error is fatal to SSL. */
77 gs->state = GS_INIT; /* so we don't crash next time */ 77 gs->state = GS_INIT; /* so we don't crash next time */
78 rv = SECFailure; 78 rv = SECFailure;
79 break; 79 break;
80 } 80 }
81 81
82 gs->offset += nb; 82 gs->offset += nb;
83 gs->remainder -= nb; 83 gs->remainder -= nb;
84 if (gs->state == GS_DATA) 84 if (gs->state == GS_DATA)
85 gs->inbuf.len += nb; 85 gs->inbuf.len += nb;
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 /* ssl3_GatherCompleteHandshake requires both of these locks. */ 446 /* ssl3_GatherCompleteHandshake requires both of these locks. */
447 PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); 447 PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
448 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); 448 PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
449 449
450 do { 450 do {
451 rv = ssl3_GatherCompleteHandshake(ss, flags); 451 rv = ssl3_GatherCompleteHandshake(ss, flags);
452 } while (rv > 0 && ss->gs.buf.len == 0); 452 } while (rv > 0 && ss->gs.buf.len == 0);
453 453
454 return rv; 454 return rv;
455 } 455 }
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/ssl3ext.c ('k') | net/third_party/nss/ssl/ssl3prot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698