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

Issue 3141026: Reintegrate certificate selection in HttpNetworkTransaction DoLoop (Closed)

Created:
10 years, 4 months ago by davidben
Modified:
9 years, 6 months ago
Reviewers:
Mike Belshe, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Reintegrate certificate selection in HttpNetworkTransaction DoLoop The HttpNetworkTransaction refactor intercepts the client auth handling and moves it out of DoLoop. Because HandleCertificateRequest often switches states, this caused a DCHECK and crash in some circumstances. This reintegrates it and adds unit tests to catch the DCHECK. We really want to test sending a legitimate certificate, as well as more checking interesting errors, but we cannot import temporary keys yet. We also add a patch for tlslite to send a non-empty certificate_types. Apple's SSL implementation raises a protocol error otherwise. BUG=52744, 51132, 52778 TEST=SSLClientSocketTest.ConnectClientAuth*,URLRequestTest.ClientAuthTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56983

Patch Set 1 #

Patch Set 2 : Fix the Linux DCHECK #

Total comments: 4

Patch Set 3 : Address Wan-Teh's comments #

Patch Set 4 : Correctly integrate with state machine, fix Windows crash #

Patch Set 5 : Add a TODO for future unit test #

Total comments: 4

Patch Set 6 : Send non-empty certificate_types to fix net_unittests on OS X #

Patch Set 7 : Adjust comment #

Total comments: 4

Patch Set 8 : Address Wan-Teh's comments and rebase on top of trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -8 lines) Patch
M net/http/http_network_transaction.cc View 2 3 4 5 6 5 chunks +7 lines, -4 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 2 chunks +56 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/tlslite/README.chromium View 6 7 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/tlslite/patches/send_certificate_types.patch View 1 chunk +32 lines, -0 lines 0 comments Download
M third_party/tlslite/tlslite/constants.py View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/tlslite/tlslite/messages.py View 6 7 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
davidben
URLRequestTest.ClientAuthTest currently does not pass. See http://crbug.com/52744
10 years, 4 months ago (2010-08-19 20:16:20 UTC) #1
wtc
Please have mbelshe review the one-line change in http_network_transaction.cc. I reviewed the other two files. ...
10 years, 4 months ago (2010-08-19 22:02:52 UTC) #2
davidben
http://codereview.chromium.org/3141026/diff/3001/4002 File net/socket/ssl_client_socket_unittest.cc (right): http://codereview.chromium.org/3141026/diff/3001/4002#newcode214 net/socket/ssl_client_socket_unittest.cc:214: TEST_F(SSLClientSocketTest, ConnectClientAuthEmptyCert) { On 2010/08/19 22:02:52, wtc wrote: > ...
10 years, 4 months ago (2010-08-19 23:07:27 UTC) #3
davidben
Mike: Wan-Teh and I looked over this code and the related crash. It seems I ...
10 years, 4 months ago (2010-08-20 02:56:33 UTC) #4
Mike Belshe
LGTM -- thanks for picking this up. Go automated tests :-) http://codereview.chromium.org/3141026/diff/17001/18001 File net/http/http_network_transaction.cc (right): ...
10 years, 4 months ago (2010-08-20 03:29:07 UTC) #5
wtc
LGTM. http://codereview.chromium.org/3141026/diff/17001/18001 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/3141026/diff/17001/18001#newcode582 net/http/http_network_transaction.cc:582: result = HandleCertificateRequest(result); DoLoop() sets next_state_ = STATE_NONE ...
10 years, 4 months ago (2010-08-20 18:39:29 UTC) #6
davidben
Alright. Here's a new revision that also adds a patch for tlslite. The tests were ...
10 years, 4 months ago (2010-08-20 20:16:58 UTC) #7
wtc
LGTM++ Excellent conclusion of your internship! http://codereview.chromium.org/3141026/diff/26001/19005 File third_party/tlslite/README.chromium (right): http://codereview.chromium.org/3141026/diff/26001/19005#newcode13 third_party/tlslite/README.chromium:13: SSL implementation rejects ...
10 years, 4 months ago (2010-08-20 20:50:41 UTC) #8
wtc
On 2010/08/20 20:16:58, David Benjamin wrote: > > Arguably the correct response there is to ...
10 years, 4 months ago (2010-08-20 20:58:57 UTC) #9
davidben
10 years, 4 months ago (2010-08-21 05:30:32 UTC) #10
Tree is closed right now, so I'll go ahead and update the CL. I rebased on top
of trunk (only affects the README file) and addressed the nits below.

The previous try bot runs should still apply, so I guess I'll land this sometime
tomorrow, assume the tree is open.

http://codereview.chromium.org/3141026/diff/26001/19005
File third_party/tlslite/README.chromium (right):

http://codereview.chromium.org/3141026/diff/26001/19005#newcode13
third_party/tlslite/README.chromium:13: SSL implementation rejects an empty list
and raises an SSL protocol error.
On 2010/08/20 20:50:41, wtc wrote:
> Nit: SSL implementation => Secure Transport library

Done.

http://codereview.chromium.org/3141026/diff/26001/19008
File third_party/tlslite/tlslite/messages.py (right):

http://codereview.chromium.org/3141026/diff/26001/19008#newcode349
third_party/tlslite/tlslite/messages.py:349: #Apple's implementation rejects
empty certificate_types, so
On 2010/08/20 20:50:41, wtc wrote:
> Nit: Apple's implementation => Apple's Secure Transport library

Done.

Powered by Google App Engine
This is Rietveld 408576698