| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 2850fef3aeed19cdb2c7431133049410c6a9244d..cdf77ca1deb74f3040711f0a512bfb3b06c30a70 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -1288,30 +1288,32 @@ void ChromeContentBrowserClient::SelectClientCertificate(
|
| << cert_request_info->host_and_port;
|
|
|
| Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
|
| - scoped_ptr<Value> filter(
|
| - profile->GetHostContentSettingsMap()->GetWebsiteSetting(
|
| - requesting_url,
|
| - requesting_url,
|
| - CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
|
| - std::string(), NULL));
|
| -
|
| - if (filter.get()) {
|
| - // Try to automatically select a client certificate.
|
| - if (filter->IsType(Value::TYPE_DICTIONARY)) {
|
| - DictionaryValue* filter_dict =
|
| - static_cast<DictionaryValue*>(filter.get());
|
| -
|
| - const std::vector<scoped_refptr<net::X509Certificate> >&
|
| - all_client_certs = cert_request_info->client_certs;
|
| - for (size_t i = 0; i < all_client_certs.size(); ++i) {
|
| - if (CertMatchesFilter(*all_client_certs[i], *filter_dict)) {
|
| - // Use the first certificate that is matched by the filter.
|
| - callback.Run(all_client_certs[i]);
|
| - return;
|
| + if (!cert_request_info->no_client_certs) {
|
| + scoped_ptr<Value> filter(
|
| + profile->GetHostContentSettingsMap()->GetWebsiteSetting(
|
| + requesting_url,
|
| + requesting_url,
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
|
| + std::string(), NULL));
|
| +
|
| + if (filter.get()) {
|
| + // Try to automatically select a client certificate.
|
| + if (filter->IsType(Value::TYPE_DICTIONARY)) {
|
| + DictionaryValue* filter_dict =
|
| + static_cast<DictionaryValue*>(filter.get());
|
| +
|
| + const std::vector<scoped_refptr<net::X509Certificate> >&
|
| + all_client_certs = cert_request_info->client_certs;
|
| + for (size_t i = 0; i < all_client_certs.size(); ++i) {
|
| + if (CertMatchesFilter(*all_client_certs[i], *filter_dict)) {
|
| + // Use the first certificate that is matched by the filter.
|
| + callback.Run(all_client_certs[i]);
|
| + return;
|
| + }
|
| }
|
| + } else {
|
| + NOTREACHED();
|
| }
|
| - } else {
|
| - NOTREACHED();
|
| }
|
| }
|
|
|
|
|