Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: chrome/browser/ssl/bad_clock_blocking_page.cc

Issue 1332633002: Add constructor to create SSLStatus from SSLInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp: debug logging for mac/win test failure Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | chrome/browser/ssl/ssl_blocking_page.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/bad_clock_blocking_page.cc
diff --git a/chrome/browser/ssl/bad_clock_blocking_page.cc b/chrome/browser/ssl/bad_clock_blocking_page.cc
index 0bf69fff9b07ce0469dd61fa821e9cc0a9155fe8..0c2870610131215d41048e927091112ea14ed21b 100644
--- a/chrome/browser/ssl/bad_clock_blocking_page.cc
+++ b/chrome/browser/ssl/bad_clock_blocking_page.cc
@@ -36,6 +36,7 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/signed_certificate_timestamp_store.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/ssl_status.h"
@@ -276,15 +277,24 @@ void BadClockBlockingPage::PopulateInterstitialStrings(
}
void BadClockBlockingPage::OverrideEntry(NavigationEntry* entry) {
+ int process_id = web_contents()->GetRenderProcessHost()->GetID();
int cert_id = content::CertStore::GetInstance()->StoreCert(
meacer 2015/09/09 18:26:07 How about consting process_id and cert_id too, sin
estark 2015/09/10 14:32:05 Done.
- ssl_info_.cert.get(), web_contents()->GetRenderProcessHost()->GetID());
+ ssl_info_.cert.get(), process_id);
DCHECK(cert_id);
- entry->GetSSL().security_style =
- content::SECURITY_STYLE_AUTHENTICATION_BROKEN;
- entry->GetSSL().cert_id = cert_id;
- entry->GetSSL().cert_status = ssl_info_.cert_status;
- entry->GetSSL().security_bits = ssl_info_.security_bits;
+ content::SignedCertificateTimestampStore* sct_store(
+ content::SignedCertificateTimestampStore::GetInstance());
+ content::SignedCertificateTimestampIDStatusList sct_ids;
+ for (const auto& sct_and_status : ssl_info_.signed_certificate_timestamps) {
+ const int sct_id(sct_store->Store(sct_and_status.sct.get(), process_id));
+ DCHECK(sct_id);
+ sct_ids.push_back(content::SignedCertificateTimestampIDAndStatus(
+ sct_id, sct_and_status.status));
+ }
meacer 2015/09/09 18:26:07 Hah, I remember trying to do something like this i
+
+ entry->GetSSL() =
+ content::SSLStatus(content::SECURITY_STYLE_AUTHENTICATION_BROKEN, cert_id,
+ sct_ids, ssl_info_);
}
// This handles the commands sent from the interstitial JavaScript.
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | chrome/browser/ssl/ssl_blocking_page.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698