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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 147159: Fix a crash in net::SSLClientSocketWin::OnIOComplete(int) when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | net/socket/ssl_client_socket_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
===================================================================
--- net/socket/ssl_client_socket_nss.cc (revision 19275)
+++ net/socket/ssl_client_socket_nss.cc (working copy)
@@ -66,6 +66,7 @@
#include "base/logging.h"
#include "base/nss_init.h"
#include "base/string_util.h"
+#include "net/base/cert_verifier.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/ssl_info.h"
@@ -366,6 +367,9 @@
nss_fd_ = NULL;
}
+ // Shut down anything that may call us back (through buffer_send_callback_,
+ // buffer_recv_callback, or _io_callback_).
+ verifier_.reset();
transport_->Disconnect();
// Reset object state
@@ -721,13 +725,17 @@
flags |= X509Certificate::VERIFY_REV_CHECKING_ENABLED;
if (ssl_config_.verify_ev_cert)
flags |= X509Certificate::VERIFY_EV_CERT;
- return verifier_.Verify(server_cert_, hostname_, flags,
- &server_cert_verify_result_, &io_callback_);
+ verifier_.reset(new CertVerifier);
+ return verifier_->Verify(server_cert_, hostname_, flags,
+ &server_cert_verify_result_, &io_callback_);
}
// Derived from AuthCertificateCallback() in
// mozilla/source/security/manager/ssl/src/nsNSSCallbacks.cpp.
int SSLClientSocketNSS::DoVerifyCertComplete(int result) {
+ DCHECK(verifier_.get());
+ verifier_.reset();
+
if (result == OK) {
// Remember the intermediate CA certs if the server sends them to us.
CERTCertList* cert_list = CERT_GetCertChainFromCert(
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | net/socket/ssl_client_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698