| Index: chrome/browser/tab_contents/tab_contents_ssl_helper.cc
|
| diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
|
| index b8cae38119ee9bd382e36fa937ee82c4d6cff71f..d9fcdf643e545acec7a0cac50f3a872e0f2bc616 100644
|
| --- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
|
| +++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
|
| @@ -213,25 +213,29 @@ void TabContentsSSLHelper::SelectClientCertificate(
|
| HostContentSettingsMap* map =
|
| tab_contents_->profile()->GetHostContentSettingsMap();
|
| scoped_ptr<Value> filter(map->GetContentSettingValue(
|
| - requesting_url,
|
| - requesting_url,
|
| + requesting_url, requesting_url,
|
| CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
|
| - std::string()));
|
| + std::string(),
|
| + NULL, NULL));
|
|
|
| scoped_refptr<net::X509Certificate> selected_cert;
|
| if (filter.get()) {
|
| // Try to automatically select a client certificate.
|
| - DCHECK(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)) {
|
| - selected_cert = all_client_certs[i];
|
| - // Use the first certificate that is matched by the filter.
|
| - break;
|
| + 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)) {
|
| + selected_cert = all_client_certs[i];
|
| + // Use the first certificate that is matched by the filter.
|
| + break;
|
| + }
|
| }
|
| + } else {
|
| + NOTREACHED();
|
| }
|
| }
|
|
|
|
|