summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-07 19:50:08 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-07 19:50:08 +0000
commitaaa10a155a3e225dd690808f67455c8f466ff237 (patch)
treebc5cb18bdd91a497157e1343119d9e8aaecd7b79
parent8b32226867290d375d93525ab5f4eb752a7b4c87 (diff)
downloadchromium_src-aaa10a155a3e225dd690808f67455c8f466ff237.zip
chromium_src-aaa10a155a3e225dd690808f67455c8f466ff237.tar.gz
chromium_src-aaa10a155a3e225dd690808f67455c8f466ff237.tar.bz2
Fix DCHECK on multiple SSL client auths for the same request.
BUG=78679 TEST=see bug Review URL: http://codereview.chromium.org/6814009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80828 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ssl/ssl_client_auth_handler.cc9
-rw-r--r--net/url_request/url_request.h4
2 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/ssl/ssl_client_auth_handler.cc b/chrome/browser/ssl/ssl_client_auth_handler.cc
index 0d06fb2..ba76736 100644
--- a/chrome/browser/ssl/ssl_client_auth_handler.cc
+++ b/chrome/browser/ssl/ssl_client_auth_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,6 +8,7 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_view_host_notification_task.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
+#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "net/url_request/url_request.h"
SSLClientAuthHandler::SSLClientAuthHandler(
@@ -61,6 +62,12 @@ void SSLClientAuthHandler::DoCertificateSelected(net::X509Certificate* cert) {
// certificate.
if (request_) {
request_->ContinueWithCertificate(cert);
+
+ ResourceDispatcherHostRequestInfo* info =
+ ResourceDispatcherHost::InfoForRequest(request_);
+ if (info)
+ info->set_ssl_client_auth_handler(NULL);
+
request_ = NULL;
}
}
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 5cf3427..40f7d8a 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -120,8 +120,8 @@ class URLRequest : public base::NonThreadSafe {
//
// The callbacks will be called in the following order:
// Start()
- // - OnCertificateRequested* (zero or one call, if the SSL server
- // requests a client certificate for authentication)
+ // - OnCertificateRequested* (zero or more calls, if the SSL server and/or
+ // SSL proxy requests a client certificate for authentication)
// - OnSSLCertificateError* (zero or one call, if the SSL server's
// certificate has an error)
// - OnReceivedRedirect* (zero or more calls, for the number of redirects)