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

Issue 4213003: Don't resend payload after Snap Start misprediction. (Closed)

Created:
10 years, 1 month ago by agl
Modified:
9 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Don't resend payload after Snap Start misprediction. The Snap Start code in NSS worked like the prototype implementation in tlsclient. This had the library take care of resending the application data in the event of a mispredict. However, that was safe because it did certificate verification as the message was received. However, in Chrome, it's possible that a mispredict could be triggered by the server having a different certificate and NSS would resend the application data before Chrome verified the certificate. This change removes that behaviour from NSS and makes the retransmission the job of ssl_client_socket_nss.cc. BUG=none TEST=none

Patch Set 1 #

Patch Set 2 : ... #

Total comments: 8

Patch Set 3 : ... #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -20 lines) Patch
M net/socket/ssl_client_socket_nss.cc View 1 2 1 chunk +20 lines, -2 lines 1 comment Download
M net/third_party/nss/ssl/snapstart.c View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M net/third_party/nss/ssl/ssl3con.c View 1 chunk +0 lines, -14 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
agl
10 years, 1 month ago (2010-10-28 16:56:05 UTC) #1
wtc
The code in ssl_client_socket_nss.cc is very subtle, so I reviewed it carefully. Please bear with ...
10 years, 1 month ago (2010-10-28 22:09:04 UTC) #2
agl
On Thu, Oct 28, 2010 at 6:09 PM, <wtc@chromium.org> wrote: > I'd like to see ...
10 years, 1 month ago (2010-10-28 22:15:20 UTC) #3
agl
http://codereview.chromium.org/4213003/diff/2001/3001 File net/socket/ssl_client_socket_nss.cc (right): http://codereview.chromium.org/4213003/diff/2001/3001#newcode2267 net/socket/ssl_client_socket_nss.cc:2267: // Likewise, if we merged a Write call into ...
10 years, 1 month ago (2010-11-02 19:26:26 UTC) #4
wtc
10 years, 1 month ago (2010-11-02 22:29:17 UTC) #5
LGTM.  Note the important issue below.  Did you test this CL?

http://codereview.chromium.org/4213003/diff/9001/10001
File net/socket/ssl_client_socket_nss.cc (right):

http://codereview.chromium.org/4213003/diff/9001/10001#newcode2289
net/socket/ssl_client_socket_nss.cc:2289: }
IMPORTANT: I believe we need to add 'else' here, at line 2289, for the
snap-start correct prediction case:
      } else {
        DoWriteCallback(user_write_buf_len_);
      }

Do you agree?

Basically, inside the if (user_write_callback_) statement that starts on line
2270, we should always call DoWriteCallback except when the
DoPayloadWrite call on line 2286 returns ERR_IO_PENDING.

Powered by Google App Engine
This is Rietveld 408576698