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

Issue 6120002: Disable False Start and clear the SSL client auth cache for HTTPS proxies on failure (Closed)

Created:
9 years, 11 months ago by Ryan Sleevi
Modified:
9 years, 7 months ago
Reviewers:
wtc, agl, Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

When performing TLS client auth with an HTTPS proxy, disable TLS false start to better handle SSL handshake failures, such as the HTTPS proxy requiring a client certificate. In addition, when an HTTPS proxy fails, ensure that it is removed from the SSL client auth cache, so that if the failure was due to an invalid client certificate, the user can be prompted to select one again. Depends on: http://codereview.chromium.org/6017010/ BUG=66424 TEST=HttpNetworkTransactionTest.Proxy_ClientAuthCertCache

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Consistency #

Total comments: 1

Patch Set 3 : rebase #

Patch Set 4 : Feedback #

Patch Set 5 : Rebase #

Patch Set 6 : restructure test/comments to match the non-proxy #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -0 lines) Patch
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 1 chunk +100 lines, -0 lines 0 comments Download
M net/http/http_stream_request.cc View 1 2 2 chunks +17 lines, -0 lines 2 comments Download

Messages

Total messages: 8 (0 generated)
Ryan Sleevi
rch: This seems like a less-hacky, medium-term solution for working around proxy errors. agl seems ...
9 years, 11 months ago (2011-01-07 01:23:37 UTC) #1
agl
LGTM http://codereview.chromium.org/6120002/diff/5001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/6120002/diff/5001/net/http/http_network_transaction_unittest.cc#newcode8374 net/http/http_network_transaction_unittest.cc:8374: extra blank line.
9 years, 11 months ago (2011-01-07 15:28:28 UTC) #2
Ryan Hamilton
LGTM with the following minor changes. I verified that this patch works when applied to ...
9 years, 11 months ago (2011-01-07 17:25:50 UTC) #3
Ryan Sleevi
On 2011/01/07 17:25:50, Ryan Hamilton wrote: > LGTM with the following minor changes. > > ...
9 years, 11 months ago (2011-01-09 08:47:33 UTC) #4
Ryan Hamilton
LGTM! Thanks! After you commit this, can you see about getting it merged to the ...
9 years, 11 months ago (2011-01-10 17:02:02 UTC) #5
Ryan Sleevi
I wasn't able to get this landed last night or this morning, as this depends ...
9 years, 11 months ago (2011-01-11 13:59:06 UTC) #6
wtc
LGTM. (I didn't review the unit test.) I have some nits and an important request ...
9 years, 11 months ago (2011-01-11 23:31:36 UTC) #7
Ryan Sleevi
9 years, 11 months ago (2011-01-11 23:41:46 UTC) #8
On 2011/01/11 23:31:36, wtc wrote:
> LGTM.  (I didn't review the unit test.)
> 
> I have some nits and an important request for a better
> long-term solution below.
> 
> The long-term solution I proposed, moving the manipulation
> (Add and Remove calls) of ssl_client_auth_cache to the
> SSLClientSocket class, requires passing ssl_client_auth_cache
> to the SSLClientSocket factory and constructor, a tedious
> but straightforward work.

Agreed. This also has the benefit that it will not need to abort the connection
per SSL connect to push up the layer, as if the cache can service the request,
it can be done during the current handshake.

Longer term, this would hopefully support moving the certificate verification to
happen after receiving the Certificate, before sending the client certificate.

> 
>
http://codereview.chromium.org/6120002/diff/35001/net/http/http_stream_reques...
> File net/http/http_stream_request.cc (right):
> 
>
http://codereview.chromium.org/6120002/diff/35001/net/http/http_stream_reques...
> net/http/http_stream_request.cc:920: // http://crbug.com/FIXME
> Please replace "FIXME" with the bug number.
> 
> Is ssl_config() the SSL config for the destination server
> or the HTTPS proxy?  I believe it is the SSL config for
> the destination server.  If so, we should open a bug for
> adding an SSL config for HTTPS proxy, or convince ourselves
> that the destination server and HTTPS proxy can share SSL
> config.

Yes, that's the FIXME that was meant to be filed. I had mentioned it to rch via
e-mail and wanted to confirm with him it was a bug. Over the weekend I wrote a
POC CL, which I've copied you two on, but not filed yet. I'd meant to do so
before committing.

>
http://codereview.chromium.org/6120002/diff/35001/net/http/http_stream_reques...
> net/http/http_stream_request.cc:1012: if (proxy_info()->is_https() &&
> ssl_config_->send_client_cert) {
> Why don't you test for ERR_PROXY_CONNECTION_FAILED here?
> 
> Perhaps we should add a new error code
> ERR_PROXY_SSL_CLIENT_AUTH_CERT_NEEDED for this case?
> 
> Or perhaps we should move the manipulation of
> ssl_client_auth_cache to the SSLClientSocket class, rather
> than spreading across HttpNetworkTransaction and
> HttpStreamRequest?  That seems like the best long-term
> solution.

ERR_PROXY_CONNECTION_FAILED is only returned if an error is encountered during
the initial SSL handshake. If the peer requests renegotiation (for example,
after seeing the CONNECT request), then it's bubbled up as-is.

This way erred on the side of invalidating more than necessary, to guarantee it
caught the edges, rather than less than necessary, and potentially bugging.
However, as http://codereview.chromium.org/6120003/ picked up, there are perhaps
other issues with HTTPS proxies that may need to be addressed first.

Powered by Google App Engine
This is Rietveld 408576698