OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bad_clock_blocking_page.h" | 5 #include "chrome/browser/ssl/bad_clock_blocking_page.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 ssl_info_.cert.get(), process_id); | 122 ssl_info_.cert.get(), process_id); |
123 DCHECK(cert_id); | 123 DCHECK(cert_id); |
124 | 124 |
125 content::SignedCertificateTimestampStore* sct_store( | 125 content::SignedCertificateTimestampStore* sct_store( |
126 content::SignedCertificateTimestampStore::GetInstance()); | 126 content::SignedCertificateTimestampStore::GetInstance()); |
127 content::SignedCertificateTimestampIDStatusList sct_ids; | 127 content::SignedCertificateTimestampIDStatusList sct_ids; |
128 for (const auto& sct_and_status : ssl_info_.signed_certificate_timestamps) { | 128 for (const auto& sct_and_status : ssl_info_.signed_certificate_timestamps) { |
129 const int sct_id(sct_store->Store(sct_and_status.sct.get(), process_id)); | 129 const int sct_id(sct_store->Store(sct_and_status.sct.get(), process_id)); |
130 DCHECK(sct_id); | 130 DCHECK(sct_id); |
131 sct_ids.push_back(content::SignedCertificateTimestampIDAndStatus( | 131 sct_ids.push_back(content::SignedCertificateTimestampIDAndStatus( |
132 sct_id, sct_and_status.status)); | 132 sct_id, |
| 133 sct_and_status.status, |
| 134 sct_and_status.sct->version, |
| 135 sct_and_status.sct->log_id, |
| 136 sct_and_status.sct->timestamp.ToJavaTime(), |
| 137 sct_and_status.sct->signature, |
| 138 sct_and_status.sct->origin, |
| 139 sct_and_status.sct->log_description)); |
133 } | 140 } |
134 | 141 |
135 entry->GetSSL() = | 142 entry->GetSSL() = |
136 content::SSLStatus(content::SECURITY_STYLE_AUTHENTICATION_BROKEN, cert_id, | 143 content::SSLStatus(content::SECURITY_STYLE_AUTHENTICATION_BROKEN, cert_id, |
137 sct_ids, ssl_info_); | 144 sct_ids, ssl_info_); |
138 } | 145 } |
139 | 146 |
140 void BadClockBlockingPage::SetSSLCertReporterForTesting( | 147 void BadClockBlockingPage::SetSSLCertReporterForTesting( |
141 scoped_ptr<SSLCertReporter> ssl_cert_reporter) { | 148 scoped_ptr<SSLCertReporter> ssl_cert_reporter) { |
142 cert_report_helper_->SetSSLCertReporterForTesting( | 149 cert_report_helper_->SetSSLCertReporterForTesting( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 182 |
176 void BadClockBlockingPage::NotifyDenyCertificate() { | 183 void BadClockBlockingPage::NotifyDenyCertificate() { |
177 // It's possible that callback_ may not exist if the user clicks "Proceed" | 184 // It's possible that callback_ may not exist if the user clicks "Proceed" |
178 // followed by pressing the back button before the interstitial is hidden. | 185 // followed by pressing the back button before the interstitial is hidden. |
179 // In that case the certificate will still be treated as allowed. | 186 // In that case the certificate will still be treated as allowed. |
180 if (callback_.is_null()) | 187 if (callback_.is_null()) |
181 return; | 188 return; |
182 | 189 |
183 base::ResetAndReturn(&callback_).Run(false); | 190 base::ResetAndReturn(&callback_).Run(false); |
184 } | 191 } |
OLD | NEW |