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

Issue 147159: Fix a crash in net::SSLClientSocketWin::OnIOComplete(int) when... (Closed)

Created:
11 years, 6 months ago by wtc
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), willchan no longer on Chromium
Visibility:
Public.

Description

Fix a crash in net::SSLClientSocketWin::OnIOComplete(int) when an HttpNetworkTransaction is destroyed while its SSLClientSocket is verifying a certificate. Document that ClientSocket::Disconnect aborts any pending IO and prevents completion callback from running, like a cancel method. Change the verifier_ member of SSLClientSocket to a scoped_ptr so that we can destroy the CertVerifier object in the Disconnect method. (CertVerifier doesn't have a cancel method, so we cancel pending certificate verification by destroying the CertVerifier object.) R=willchan BUG=http://crbug.com/13981 TEST=none. I can only reproduce this crash by modifying the source code to create that condition. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19307

Patch Set 1 #

Patch Set 2 : Remove cert_verifier.h from this CL #

Total comments: 4

Patch Set 3 : Fix Linux compilation errors and add DCHECK #

Patch Set 4 : Upload before checkin #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -14 lines) Patch
M net/http/http_network_transaction.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M net/socket/client_socket.h View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M net/socket/ssl_client_socket_nss.h View 1 2 3 chunks +2 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 chunks +10 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_win.h View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_win.cc View 1 2 3 chunks +9 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
wtc
Will: please review this CL. Please also review http_network_transaction.cc (outside this CL) to verify the ...
11 years, 6 months ago (2009-06-25 19:41:57 UTC) #1
willchan no longer on Chromium
lgtm, although it'd be nice to have tests that verify that Disconnect() does cancel the ...
11 years, 6 months ago (2009-06-25 20:57:47 UTC) #2
eroman
lgtm http://codereview.chromium.org/147159/diff/1012/17 File net/socket/ssl_client_socket_nss.cc (right): http://codereview.chromium.org/147159/diff/1012/17#newcode728 Line 728: verifier.reset(new CertVerifier); hmm... this strikes me as ...
11 years, 6 months ago (2009-06-25 21:09:38 UTC) #3
wtc
eroman: I made all of your suggested changes. Thanks. http://codereview.chromium.org/147159/diff/1012/15 File net/socket/ssl_client_socket_win.cc (right): http://codereview.chromium.org/147159/diff/1012/15#newcode865 Line ...
11 years, 6 months ago (2009-06-25 22:12:04 UTC) #4
rvargas (doing something else)
11 years, 6 months ago (2009-06-25 22:32:05 UTC) #5
LGTM. Sorry for taking that long.

Powered by Google App Engine
This is Rietveld 408576698