summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_win.h
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 23:40:24 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 23:40:24 +0000
commit92d9cade98d356a2f12be8c633f8de1e750b876b (patch)
treee8a846deabbef8bcd7b2cded5f79500d62a27b2e /net/socket/ssl_client_socket_win.h
parent6a3d3e6c7511c586128b11901310b0475b2b982a (diff)
downloadchromium_src-92d9cade98d356a2f12be8c633f8de1e750b876b.zip
chromium_src-92d9cade98d356a2f12be8c633f8de1e750b876b.tar.gz
chromium_src-92d9cade98d356a2f12be8c633f8de1e750b876b.tar.bz2
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. Review URL: http://codereview.chromium.org/147159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_win.h')
-rw-r--r--net/socket/ssl_client_socket_win.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/socket/ssl_client_socket_win.h b/net/socket/ssl_client_socket_win.h
index 6e03309..461047c 100644
--- a/net/socket/ssl_client_socket_win.h
+++ b/net/socket/ssl_client_socket_win.h
@@ -14,7 +14,6 @@
#include <string>
#include "base/scoped_ptr.h"
-#include "net/base/cert_verifier.h"
#include "net/base/cert_verify_result.h"
#include "net/base/completion_callback.h"
#include "net/base/ssl_config_service.h"
@@ -22,6 +21,8 @@
namespace net {
+class CertVerifier;
+
// An SSL client socket implemented with the Windows Schannel.
class SSLClientSocketWin : public SSLClientSocket {
public:
@@ -104,7 +105,7 @@ class SSLClientSocketWin : public SSLClientSocket {
SecPkgContext_StreamSizes stream_sizes_;
scoped_refptr<X509Certificate> server_cert_;
- CertVerifier verifier_;
+ scoped_ptr<CertVerifier> verifier_;
CertVerifyResult server_cert_verify_result_;
CredHandle* creds_;