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

Issue 7054010: Update SSLServerSocket to provide the net::StreamSocket interface. (Closed)

Created:
9 years, 7 months ago by Wez
Modified:
9 years, 6 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, cbentzel+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

This change is part of a cleanup of the remoting component's session initialisation. Have SSLServerSocket implement the StreamSocket interface, since SSL is stream-oriented. Calling code can then make use of methods not available on the more general Socket interface, such as IsConnected and Disconnect. BUG= TEST=Unit tests.

Patch Set 1 : Split up CL; this one just covers the StreamSocket change. #

Patch Set 2 : Fix the SSLServerSocketOpenSSL stub for these changes. #

Total comments: 6

Patch Set 3 : Pick nits. #

Patch Set 4 : Remove const qualifier on RSAPrivateKey parameter. #

Total comments: 2

Patch Set 5 : Fix function signature for OpenSSL build. #

Total comments: 11

Patch Set 6 : Reinstate SSLServerSocket type, and address comments. #

Total comments: 15

Patch Set 7 : Switch back to SSLServerSocket from StreamSocket at call-sites. #

Total comments: 4

Patch Set 8 : Add a StartHandshake method, and make Connect NOT_IMPLEMENTED. #

Total comments: 8

Patch Set 9 : Fix net_unittests and rename things consistently to "handshake". #

Total comments: 12

Patch Set 10 : Address comments. #

Patch Set 11 : Fix missed Connect call to Handshake in unit test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -109 lines) Patch
M net/base/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M net/socket/ssl_server_socket.h View 1 2 3 4 5 6 7 8 9 2 chunks +21 lines, -22 lines 0 comments Download
M net/socket/ssl_server_socket_nss.h View 1 2 3 4 5 6 7 8 5 chunks +25 lines, -17 lines 0 comments Download
M net/socket/ssl_server_socket_nss.cc View 1 2 3 4 5 6 7 8 9 7 chunks +70 lines, -18 lines 0 comments Download
M net/socket/ssl_server_socket_openssl.cc View 1 2 3 4 5 1 chunk +7 lines, -44 lines 0 comments Download
M net/socket/ssl_server_socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M remoting/protocol/jingle_session.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 31 (0 generated)
Wez
This just a heads-up; no need to review anything (yet). It's an extension of CL ...
9 years, 7 months ago (2011-05-20 16:42:17 UTC) #1
Wez
Alpha: Any thoughts on why SSLServerSocket shouldn't be a StreamSocket as in this CL? (CL ...
9 years, 6 months ago (2011-05-31 16:52:32 UTC) #2
Sergey Ulanov
I think it should be a StreamSocket. StreamSocket was called ClientSocket at the time SSLServerSocket ...
9 years, 6 months ago (2011-05-31 17:01:07 UTC) #3
Wez
On 2011/05/31 17:01:07, sergeyu wrote: > I think it should be a StreamSocket. StreamSocket was ...
9 years, 6 months ago (2011-05-31 17:05:08 UTC) #4
Alpha Left Google
On 2011/05/31 16:52:32, Wez wrote: > Alpha: Any thoughts on why SSLServerSocket shouldn't be a ...
9 years, 6 months ago (2011-05-31 17:52:33 UTC) #5
Wez
sergeyu: I've stripped this CL down just to the SSLServerSocket->StreamSocket change - PTAL. bulach: I've ...
9 years, 6 months ago (2011-05-31 21:51:37 UTC) #6
Sergey Ulanov
LGTM. Just some nits. http://codereview.chromium.org/7054010/diff/13001/net/socket/ssl_server_socket_nss.cc File net/socket/ssl_server_socket_nss.cc (right): http://codereview.chromium.org/7054010/diff/13001/net/socket/ssl_server_socket_nss.cc#newcode223 net/socket/ssl_server_socket_nss.cc:223: nit: remove this empty line. ...
9 years, 6 months ago (2011-05-31 22:19:49 UTC) #7
Wez
Nits picked. Will wait to commit til @bulach has a chance to sanity-check removal of ...
9 years, 6 months ago (2011-05-31 22:41:54 UTC) #8
Sergey Ulanov
+wtc to approve changes in net/
9 years, 6 months ago (2011-05-31 22:45:39 UTC) #9
bulach
LGTM thanks again! just one nit on the OpenSSL stub to get it linking: http://codereview.chromium.org/7054010/diff/15001/net/socket/ssl_server_socket_openssl.cc ...
9 years, 6 months ago (2011-06-01 10:57:07 UTC) #10
Wez
OK, just waiting on @wtc now. http://codereview.chromium.org/7054010/diff/15001/net/socket/ssl_server_socket_openssl.cc File net/socket/ssl_server_socket_openssl.cc (right): http://codereview.chromium.org/7054010/diff/15001/net/socket/ssl_server_socket_openssl.cc#newcode13 net/socket/ssl_server_socket_openssl.cc:13: StreamSocket* CreateSSLServerSocket(Socket* socket, ...
9 years, 6 months ago (2011-06-01 16:54:11 UTC) #11
wtc
I will review this CL tomorrow. (I took this afternoon off.)
9 years, 6 months ago (2011-06-02 01:38:46 UTC) #12
wtc
I added willchan and mbelshe as reviewers. willchan reviewed sergeyu's previous CLs that added ServerSocket ...
9 years, 6 months ago (2011-06-02 19:48:24 UTC) #13
Wez
With regards to the ServerSocket vs StreamSocket naming/function issue, I'm inclined to agree. With the ...
9 years, 6 months ago (2011-06-02 22:06:01 UTC) #14
wtc
LGTM. You can check this in before willchan reviews it. Nit: I would shorten the ...
9 years, 6 months ago (2011-06-02 23:12:58 UTC) #15
willchan no longer on Chromium
I'm fine with the overall goal of making SSLServerSocket inherit from StreamSocket. I don't think ...
9 years, 6 months ago (2011-06-03 10:23:44 UTC) #16
Wez
http://codereview.chromium.org/7054010/diff/18002/net/socket/ssl_server_socket.h File net/socket/ssl_server_socket.h (right): http://codereview.chromium.org/7054010/diff/18002/net/socket/ssl_server_socket.h#newcode25 net/socket/ssl_server_socket.h:25: // Creates an SSL server-side StreamSocket over analready-connected transport ...
9 years, 6 months ago (2011-06-03 17:47:07 UTC) #17
wtc
http://codereview.chromium.org/7054010/diff/18002/remoting/protocol/jingle_session.cc File remoting/protocol/jingle_session.cc (right): http://codereview.chromium.org/7054010/diff/18002/remoting/protocol/jingle_session.cc#newcode407 remoting/protocol/jingle_session.cc:407: int ret = socket->Connect(&ssl_connect_callback_); On 2011/06/03 17:47:07, Wez wrote: ...
9 years, 6 months ago (2011-06-03 18:03:40 UTC) #18
Mike Belshe
A few comments. http://codereview.chromium.org/7054010/diff/26001/net/socket/ssl_server_socket_nss.cc File net/socket/ssl_server_socket_nss.cc (right): http://codereview.chromium.org/7054010/diff/26001/net/socket/ssl_server_socket_nss.cc#newcode95 net/socket/ssl_server_socket_nss.cc:95: int SSLServerSocketNSS::Connect(CompletionCallback* callback) { I guess ...
9 years, 6 months ago (2011-06-03 18:34:59 UTC) #19
Wez
Some more responses to comments. I've also chatted to willchan@ a little about this, and ...
9 years, 6 months ago (2011-06-07 00:25:28 UTC) #20
Wez
I've upload two new Patch Sets: Patch Set 8, as requested, defines an SSLServerSocket interface ...
9 years, 6 months ago (2011-06-07 22:29:28 UTC) #21
willchan no longer on Chromium
I see it in patchset 8, but the new interface is gone in patchset 9, ...
9 years, 6 months ago (2011-06-09 14:26:45 UTC) #22
Wez
On 2011/06/09 14:26:45, willchan wrote: > I see it in patchset 8, but the new ...
9 years, 6 months ago (2011-06-09 15:52:49 UTC) #23
wtc
Wez: I am confused by the state of this CL. I don't see the Patch ...
9 years, 6 months ago (2011-06-10 22:17:35 UTC) #24
Wez
http://codereview.chromium.org/7054010/diff/31001/net/socket/ssl_server_socket.h File net/socket/ssl_server_socket.h (right): http://codereview.chromium.org/7054010/diff/31001/net/socket/ssl_server_socket.h#newcode28 net/socket/ssl_server_socket.h:28: // when the process completes, or fails. If Disconnect ...
9 years, 6 months ago (2011-06-11 01:08:33 UTC) #25
wtc
Wez: just wanted to doublecheck -- do you want us to review Patch Set 9? ...
9 years, 6 months ago (2011-06-14 17:26:11 UTC) #26
Wez
Please ignore the previous comments about a Patchset 9, and yes, please look at the ...
9 years, 6 months ago (2011-06-15 03:47:59 UTC) #27
willchan no longer on Chromium
I took a quick look and it all LGTM. wtc: please doublecheck that everything is ...
9 years, 6 months ago (2011-06-16 10:56:50 UTC) #28
wtc
LGTM. Please fix as many of the problems I listed below as you can, and ...
9 years, 6 months ago (2011-06-16 21:35:07 UTC) #29
Wez
Have addressed most of wtc's comments, will follow up with the Connect->Handshake change for SSLClientSocket ...
9 years, 6 months ago (2011-06-17 04:53:37 UTC) #30
commit-bot: I haz the power
9 years, 6 months ago (2011-06-17 19:10:16 UTC) #31
Change committed as 89535

Powered by Google App Engine
This is Rietveld 408576698