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

Unified Diff: net/third_party/nss/ssl/sslsecur.c

Issue 9764001: Add DTLS support to NSS, contributed by Eric Rescorla. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: net/third_party/nss/ssl/sslsecur.c
===================================================================
--- net/third_party/nss/ssl/sslsecur.c (revision 127709)
+++ net/third_party/nss/ssl/sslsecur.c (working copy)
@@ -119,7 +119,7 @@
PORT_Assert(ss->opt.noLocks || !ssl_HaveRecvBufLock(ss));
PORT_Assert(ss->opt.noLocks || !ssl_HaveXmitBufLock(ss));
PORT_Assert(ss->opt.noLocks || !ssl_HaveSSL3HandshakeLock(ss));
-
+
if (ss->handshake == 0) {
/* Previous handshake finished. Switch to next one */
ss->handshake = ss->nextHandshake;
@@ -563,7 +563,7 @@
available = ss->gs.writeOffset - ss->gs.readOffset;
if (available == 0) {
/* Get some more data */
- if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
+ if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
/* Wait for application data to arrive. */
rv = ssl3_GatherAppDataRecord(ss, 0);
} else {
@@ -615,6 +615,7 @@
if (!(flags & PR_MSG_PEEK)) {
ss->gs.readOffset += amount;
}
+ PORT_Assert(ss->gs.readOffset <= ss->gs.writeOffset);
wtc 2012/03/21 01:22:07 Did you mean to add this assertion, or did you add
ekr 2012/03/21 01:36:40 I suspect that I added it for debugging and forgot
wtc 2012/03/21 02:12:01 I am not familiar with this code, but I suspect th
rv = amount;
SSL_TRC(30, ("%d: SSL[%d]: amount=%d available=%d",

Powered by Google App Engine
This is Rietveld 408576698