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

Issue 18984008: dart:io | Support connection renegotiation (rehandshake) on SecureSocket. (Closed)

Created:
7 years, 5 months ago by Bill Hesse
Modified:
7 years, 5 months ago
Reviewers:
Anders Johnsen
CC:
reviews_dartlang.org
Visibility:
Public.

Description

dart:io | Support connection renegotiation (rehandshake) on SecureSocket. BUG=dartbug.com/11384 R=ajohnsen@google.com Committed: https://code.google.com/p/dart/source/detail?r=24916

Patch Set 1 #

Patch Set 2 : Rebase to remove client password CL. #

Patch Set 3 : Fix indentation and remove whitespace in test file. #

Total comments: 11

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -4 lines) Patch
M runtime/bin/io_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/secure_socket.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/bin/secure_socket.cc View 1 2 3 4 chunks +56 lines, -4 lines 0 comments Download
M runtime/bin/secure_socket_patch.dart View 2 chunks +12 lines, -0 lines 0 comments Download
M sdk/lib/io/secure_socket.dart View 1 2 3 4 chunks +41 lines, -0 lines 0 comments Download
A tests/standalone/io/secure_socket_renegotiate_client.dart View 1 chunk +79 lines, -0 lines 0 comments Download
A tests/standalone/io/secure_socket_renegotiate_test.dart View 1 2 1 chunk +85 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Bill Hesse
This CL also includes the CL fixing client certificates - it depends on it, but ...
7 years, 5 months ago (2013-07-10 17:24:18 UTC) #1
Anders Johnsen
Can you rebase the CL to not include depending CL, please? That'll make it a ...
7 years, 5 months ago (2013-07-11 08:18:48 UTC) #2
Bill Hesse
Rebased.
7 years, 5 months ago (2013-07-11 10:16:28 UTC) #3
Anders Johnsen
LGTM https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket.cc File runtime/bin/secure_socket.cc (right): https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket.cc#newcode201 runtime/bin/secure_socket.cc:201: request_client_certificate || require_client_certificate; Please add a comment here. ...
7 years, 5 months ago (2013-07-11 11:20:31 UTC) #4
Bill Hesse
Committed patchset #4 manually as r24916 (presubmit successful).
7 years, 5 months ago (2013-07-11 14:02:59 UTC) #5
Bill Hesse
7 years, 5 months ago (2013-07-11 15:25:42 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket.cc
File runtime/bin/secure_socket.cc (right):

https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket....
runtime/bin/secure_socket.cc:201: request_client_certificate ||
require_client_certificate;
On 2013/07/11 11:20:32, Anders Johnsen wrote:
> Please add a comment here. It's hard to understand from the context that this
is
> needed. Would it make more sense to move it to Renegotiate?

Done.

https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket....
runtime/bin/secure_socket.cc:851: PRBool request_cert =
request_client_certificate ? PR_TRUE : PR_FALSE;
On 2013/07/11 11:20:32, Anders Johnsen wrote:
> It can not be cast directly?

Yes,  It doesn't even need a cast anymore - PRBool is just an int.

https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket....
runtime/bin/secure_socket.cc:851: PRBool request_cert =
request_client_certificate ? PR_TRUE : PR_FALSE;
On 2013/07/11 11:20:32, Anders Johnsen wrote:
> It can not be cast directly?

Yes, the implicit bool -> int cast produces 0 and 1,
the same as the enum values PR_FALSE and PR_TRUE

https://codereview.chromium.org/18984008/diff/7001/runtime/bin/secure_socket....
runtime/bin/secure_socket.cc:863: PRBool flush_cache = use_session_cache ?
PR_FALSE : PR_TRUE;
On 2013/07/11 11:20:32, Anders Johnsen wrote:
> Please don't negate in this 'cast'. Hard to read.

Done.

https://codereview.chromium.org/18984008/diff/7001/sdk/lib/io/secure_socket.dart
File sdk/lib/io/secure_socket.dart (right):

https://codereview.chromium.org/18984008/diff/7001/sdk/lib/io/secure_socket.d...
sdk/lib/io/secure_socket.dart:814: if (_status != CONNECTED) {
On 2013/07/11 11:20:32, Anders Johnsen wrote:
> I would expect this to be a StateError thrown directly, not something that'll
> modify the filter.

Done.

https://codereview.chromium.org/18984008/diff/7001/tests/standalone/io/secure...
File tests/standalone/io/secure_socket_renegotiate_test.dart (right):

https://codereview.chromium.org/18984008/diff/7001/tests/standalone/io/secure...
tests/standalone/io/secure_socket_renegotiate_test.dart:69:
options.script.replaceFirst("_test.dart", "_client.dart");
On 2013/07/11 11:20:32, Anders Johnsen wrote:
> replaceLast?

There is no replaceLast.  That is why we check the result of replaceFirst.

Powered by Google App Engine
This is Rietveld 408576698