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

Issue 4339001: Correctly handle SSL Client Authentication requests when connecting... (Closed)

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

Description

Correctly handle SSL Client Authentication requests when connecting to an HTTPS/SPDY proxy. Modify SSLClientSocket classes to correctly set the host_and_port field of the cert_request_info. Modify HttpNetworkTransaction to use this field when populating the SSL client auth cache. BUG=59292 TEST=HttpProxyClientSocketPoolTest.SslClientAuth Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65976

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 17

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 40

Patch Set 8 : '' #

Patch Set 9 : Rebase... #

Total comments: 1

Patch Set 10 : use HostPortPair instead of host,port #

Total comments: 12

Patch Set 11 : '' #

Total comments: 16

Patch Set 12 : Addressing eroman's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -167 lines) Patch
M jingle/notifier/base/chrome_async_socket.cc View 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
MM jingle/notifier/base/xmpp_client_socket_factory.h View 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
MM jingle/notifier/base/xmpp_client_socket_factory.cc View 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_proxy_client_socket_pool.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M net/http/http_proxy_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -10 lines 0 comments Download
M net/http/http_proxy_client_socket_pool_unittest.cc View 4 5 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M net/http/http_stream_request.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M net/http/http_stream_request.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -7 lines 0 comments Download
M net/socket/client_socket_factory.h View 6 7 8 9 4 chunks +9 lines, -6 lines 0 comments Download
M net/socket/client_socket_factory.cc View 6 7 8 9 3 chunks +11 lines, -10 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/socket/socket_test_util.h View 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M net/socket/socket_test_util.cc View 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
M net/socket/ssl_client_socket_mac.h View 6 7 8 9 10 11 3 chunks +8 lines, -5 lines 0 comments Download
M net/socket/ssl_client_socket_mac.cc View 6 7 8 9 10 11 6 chunks +10 lines, -9 lines 0 comments Download
M net/socket/ssl_client_socket_mac_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M net/socket/ssl_client_socket_mac_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_nss.h View 6 7 8 9 10 11 3 chunks +8 lines, -5 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 6 7 8 9 10 11 14 chunks +19 lines, -25 lines 0 comments Download
M net/socket/ssl_client_socket_nss_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M net/socket/ssl_client_socket_nss_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.h View 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_pool.h View 6 7 8 9 4 chunks +4 lines, -3 lines 0 comments Download
M net/socket/ssl_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 6 chunks +16 lines, -15 lines 0 comments Download
M net/socket/ssl_client_socket_pool_unittest.cc View 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/socket/ssl_client_socket_snapstart_unittest.cc View 10 1 chunk +3 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 7 8 9 11 chunks +11 lines, -22 lines 0 comments Download
M net/socket/ssl_client_socket_win.h View 6 7 8 9 10 11 2 chunks +10 lines, -6 lines 0 comments Download
M net/socket/ssl_client_socket_win.cc View 6 7 8 9 10 6 chunks +6 lines, -5 lines 0 comments Download
M net/socket/tcp_client_socket_pool_unittest.cc View 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/socket_stream/socket_stream.cc View 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M remoting/jingle_glue/ssl_socket_adapter.cc View 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
Ryan Hamilton
Hi Guys, I think I have Proxy SSL Client Auth working. Yay! It turned out ...
10 years, 1 month ago (2010-11-02 22:41:27 UTC) #1
Ryan Hamilton
Ugh! I take it back. Due to a configuration issue on my workstation, some of ...
10 years, 1 month ago (2010-11-02 23:03:00 UTC) #2
Ryan Hamilton
Ok, once more unto the breach. After fixing my test setup, this CL does work ...
10 years, 1 month ago (2010-11-03 18:12:06 UTC) #3
wtc
eroman: I have a question for you in http_network_transaction.cc. Please search for "eroman" in my ...
10 years, 1 month ago (2010-11-04 21:53:18 UTC) #4
Ryan Hamilton
wtc: thanks for the review. I'll get started reworking the CL now. If I'm lucky, ...
10 years, 1 month ago (2010-11-04 22:57:42 UTC) #5
wtc
http://codereview.chromium.org/4339001/diff/47001/1018 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/4339001/diff/47001/1018#newcode176 net/http/http_network_transaction.cc:176: if (ssl_client_cert_error_ == ERR_PROXY_SSL_CLIENT_AUTH_CERT_NEEDED) On 2010/11/04 22:57:42, Ryan Hamilton ...
10 years, 1 month ago (2010-11-04 23:11:27 UTC) #6
Ryan Hamilton
http://codereview.chromium.org/4339001/diff/47001/1018 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/4339001/diff/47001/1018#newcode176 net/http/http_network_transaction.cc:176: if (ssl_client_cert_error_ == ERR_PROXY_SSL_CLIENT_AUTH_CERT_NEEDED) On 2010/11/04 23:11:27, wtc wrote: ...
10 years, 1 month ago (2010-11-04 23:16:22 UTC) #7
Ryan Hamilton
Wan-Teh, can you take a look at the new patch I uploaded to see if ...
10 years, 1 month ago (2010-11-08 17:45:19 UTC) #8
eroman
http://codereview.chromium.org/4339001/diff/47001/1018 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/4339001/diff/47001/1018#newcode177 net/http/http_network_transaction.cc:177: host_port = proxy_info_.proxy_server().host_port_pair().ToString(); On 2010/11/04 21:53:18, wtc wrote: > ...
10 years, 1 month ago (2010-11-08 22:22:25 UTC) #9
wtc
LGTM. I requested many changes below, but I trust that you can make the suggested ...
10 years, 1 month ago (2010-11-11 01:11:35 UTC) #10
Ryan Hamilton
Thanks for the very thorough review! I've addressed all of your issues, with the following ...
10 years, 1 month ago (2010-11-11 18:57:00 UTC) #11
Ryan Hamilton
On 2010/11/08 22:22:25, eroman wrote: > http://codereview.chromium.org/4339001/diff/47001/1018 > File net/http/http_network_transaction.cc (right): > > http://codereview.chromium.org/4339001/diff/47001/1018#newcode177 > ...
10 years, 1 month ago (2010-11-11 19:05:44 UTC) #12
eroman
http://codereview.chromium.org/4339001/diff/177001/net/socket/client_socket_factory.h File net/socket/client_socket_factory.h (right): http://codereview.chromium.org/4339001/diff/177001/net/socket/client_socket_factory.h#newcode49 net/socket/client_socket_factory.h:49: uint16 port, Please change the function signature to take ...
10 years, 1 month ago (2010-11-11 19:18:31 UTC) #13
Ryan Hamilton
On 2010/11/11 19:18:31, eroman wrote: > http://codereview.chromium.org/4339001/diff/177001/net/socket/client_socket_factory.h > File net/socket/client_socket_factory.h (right): > > http://codereview.chromium.org/4339001/diff/177001/net/socket/client_socket_factory.h#newcode49 > ...
10 years, 1 month ago (2010-11-11 19:48:26 UTC) #14
wtc
LGTM. Note: I will not be able to review this CL again, so please make ...
10 years, 1 month ago (2010-11-12 00:12:55 UTC) #15
Ryan Hamilton
http://codereview.chromium.org/4339001/diff/76002/net/http/http_proxy_client_socket_pool.cc File net/http/http_proxy_client_socket_pool.cc (right): http://codereview.chromium.org/4339001/diff/76002/net/http/http_proxy_client_socket_pool.cc#newcode282 net/http/http_proxy_client_socket_pool.cc:282: if (transport_socket_handle_->socket()) On 2010/11/12 00:12:55, wtc wrote: > On ...
10 years, 1 month ago (2010-11-12 00:47:30 UTC) #16
eroman
lgtm http://codereview.chromium.org/4339001/diff/248002/net/http/http_stream_request.cc File net/http/http_stream_request.cc (right): http://codereview.chromium.org/4339001/diff/248002/net/http/http_stream_request.cc#newcode549 net/http/http_stream_request.cc:549: HostPortPair(request_info().url.HostNoBrackets(), How about: HostPortPair::FromURL(request_info().url) http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_socket_mac.h File net/socket/ssl_client_socket_mac.h (right): ...
10 years, 1 month ago (2010-11-12 01:12:56 UTC) #17
Ryan Hamilton
10 years, 1 month ago (2010-11-12 16:47:26 UTC) #18
I've addressed all the commends and will commit after the most recent trybot
runs go green.  Thanks!

http://codereview.chromium.org/4339001/diff/248002/net/http/http_stream_reque...
File net/http/http_stream_request.cc (right):

http://codereview.chromium.org/4339001/diff/248002/net/http/http_stream_reque...
net/http/http_stream_request.cc:549:
HostPortPair(request_info().url.HostNoBrackets(),
On 2010/11/12 01:12:56, eroman wrote:
> How about:
> HostPortPair::FromURL(request_info().url)

Done.  Awesome!

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
File net/socket/ssl_client_socket_mac.h (right):

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
net/socket/ssl_client_socket_mac.h:31: // The given hostname will be compared
with the name(s) in the server's
On 2010/11/12 01:12:56, eroman wrote:
> nit: should this comment be adjusted to mention port?

Done, for all 3 SSLClientSocket subclasses.

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
File net/socket/ssl_client_socket_nss.cc (right):

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
net/socket/ssl_client_socket_nss.cc:522: LOG(ERROR) << "Setting Snap Start info
" << host_and_port_.host();
On 2010/11/12 01:12:56, eroman wrote:
> nit: would it make sense to use the ToString() instead and show the port?
(ditto
> to other instance in this file).

Done.  (Just the logging, not the various method calls)

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
net/socket/ssl_client_socket_nss.cc:1142: VLOG(1) << "The server " <<
host_and_port_.host()
On 2010/11/12 01:12:56, eroman wrote:
> ditto on port.

Done.

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
net/socket/ssl_client_socket_nss.cc:1186: cert_request_info->host_and_port =
host_and_port_.ToString();
On 2010/11/12 01:12:56, eroman wrote:
> It may make sense in the future for cert_request_info to simply be a
> HostPortPair.

agreed.  added a todo.

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
File net/socket/ssl_client_socket_nss.h (right):

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
net/socket/ssl_client_socket_nss.h:42: // The given hostname will be compared
with the name(s) in the server's
On 2010/11/12 01:12:56, eroman wrote:
> nit: does this comment need to be updated to mention port?

Done.

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
File net/socket/ssl_client_socket_win.h (right):

http://codereview.chromium.org/4339001/diff/248002/net/socket/ssl_client_sock...
net/socket/ssl_client_socket_win.h:110: HostPortPair hostname_;
On 2010/11/12 01:12:56, eroman wrote:
> Please change the name to say host_and_port_, or something as such.

Done.

http://codereview.chromium.org/4339001/diff/248002/net/socket_stream/socket_s...
File net/socket_stream/socket_stream.cc (right):

http://codereview.chromium.org/4339001/diff/248002/net/socket_stream/socket_s...
net/socket_stream/socket_stream.cc:802: HostPortPair(url_.HostNoBrackets(),
url_.EffectiveIntPort()),
On 2010/11/12 01:12:56, eroman wrote:
> Please use HostPortPair::FromURL(url)

Done.

Powered by Google App Engine
This is Rietveld 408576698