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

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

Issue 2944953002: Add effective-expiration-date to Expect-CT reports (Closed)
Patch Set: meacer comments Created 3 years, 6 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
Index: chrome/browser/ssl/chrome_expect_ct_reporter.cc
diff --git a/chrome/browser/ssl/chrome_expect_ct_reporter.cc b/chrome/browser/ssl/chrome_expect_ct_reporter.cc
index a26a7c1a4e91c292001b1c620aeeaf0bd9ad2ba5..9697c086078451a8e6acdc5a9d1ecc4147b765ea 100644
--- a/chrome/browser/ssl/chrome_expect_ct_reporter.cc
+++ b/chrome/browser/ssl/chrome_expect_ct_reporter.cc
@@ -150,6 +150,7 @@ ChromeExpectCTReporter::~ChromeExpectCTReporter() {}
void ChromeExpectCTReporter::OnExpectCTFailed(
const net::HostPortPair& host_port_pair,
const GURL& report_uri,
+ base::Time expiration,
const net::X509Certificate* validated_certificate_chain,
const net::X509Certificate* served_certificate_chain,
const net::SignedCertificateTimestampAndStatusList&
@@ -160,13 +161,11 @@ void ChromeExpectCTReporter::OnExpectCTFailed(
if (!base::FeatureList::IsEnabled(features::kExpectCTReporting))
return;
- // TODO(estark): De-duplicate reports so that the same report isn't
- // sent too often in some period of time.
-
base::DictionaryValue report;
report.SetString("hostname", host_port_pair.host());
report.SetInteger("port", host_port_pair.port());
report.SetString("date-time", TimeToISO8601(base::Time::Now()));
+ report.SetString("effective-expiration-date", TimeToISO8601(expiration));
report.Set("served-certificate-chain",
GetPEMEncodedChainAsList(served_certificate_chain));
report.Set("validated-certificate-chain",
« no previous file with comments | « chrome/browser/ssl/chrome_expect_ct_reporter.h ('k') | chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698