OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ssl/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 ssl_info_.cert.get(), process_id); | 197 ssl_info_.cert.get(), process_id); |
198 DCHECK(cert_id); | 198 DCHECK(cert_id); |
199 | 199 |
200 content::SignedCertificateTimestampStore* sct_store( | 200 content::SignedCertificateTimestampStore* sct_store( |
201 content::SignedCertificateTimestampStore::GetInstance()); | 201 content::SignedCertificateTimestampStore::GetInstance()); |
202 content::SignedCertificateTimestampIDStatusList sct_ids; | 202 content::SignedCertificateTimestampIDStatusList sct_ids; |
203 for (const auto& sct_and_status : ssl_info_.signed_certificate_timestamps) { | 203 for (const auto& sct_and_status : ssl_info_.signed_certificate_timestamps) { |
204 const int sct_id(sct_store->Store(sct_and_status.sct.get(), process_id)); | 204 const int sct_id(sct_store->Store(sct_and_status.sct.get(), process_id)); |
205 DCHECK(sct_id); | 205 DCHECK(sct_id); |
206 sct_ids.push_back(content::SignedCertificateTimestampIDAndStatus( | 206 sct_ids.push_back(content::SignedCertificateTimestampIDAndStatus( |
207 sct_id, sct_and_status.status)); | 207 sct_id, |
| 208 sct_and_status.status, |
| 209 sct_and_status.sct->version, |
| 210 sct_and_status.sct->log_id, |
| 211 sct_and_status.sct->timestamp.ToJavaTime(), |
| 212 sct_and_status.sct->signature, |
| 213 sct_and_status.sct->origin, |
| 214 sct_and_status.sct->log_description)); |
208 } | 215 } |
209 | 216 |
210 entry->GetSSL() = | 217 entry->GetSSL() = |
211 content::SSLStatus(content::SECURITY_STYLE_AUTHENTICATION_BROKEN, cert_id, | 218 content::SSLStatus(content::SECURITY_STYLE_AUTHENTICATION_BROKEN, cert_id, |
212 sct_ids, ssl_info_); | 219 sct_ids, ssl_info_); |
213 } | 220 } |
214 | 221 |
215 void SSLBlockingPage::SetSSLCertReporterForTesting( | 222 void SSLBlockingPage::SetSSLCertReporterForTesting( |
216 scoped_ptr<SSLCertReporter> ssl_cert_reporter) { | 223 scoped_ptr<SSLCertReporter> ssl_cert_reporter) { |
217 cert_report_helper_->SetSSLCertReporterForTesting( | 224 cert_report_helper_->SetSSLCertReporterForTesting( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 284 |
278 // static | 285 // static |
279 bool SSLBlockingPage::IsOverridable(int options_mask, | 286 bool SSLBlockingPage::IsOverridable(int options_mask, |
280 const Profile* const profile) { | 287 const Profile* const profile) { |
281 const bool is_overridable = | 288 const bool is_overridable = |
282 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && | 289 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && |
283 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && | 290 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && |
284 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 291 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
285 return is_overridable; | 292 return is_overridable; |
286 } | 293 } |
OLD | NEW |