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

Unified Diff: components/certificate_transparency/new_scts_observer.cc

Issue 1100003006: Certificate Transparency: Fetching of Signed Tree Heads (DRAFT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with master Created 5 years, 7 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: components/certificate_transparency/new_scts_observer.cc
diff --git a/components/certificate_transparency/new_scts_observer.cc b/components/certificate_transparency/new_scts_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..97415c9c909ddeaa52fd5807135c7fdd9436c6fd
--- /dev/null
+++ b/components/certificate_transparency/new_scts_observer.cc
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/certificate_transparency/new_scts_observer.h"
+
+#include "components/certificate_transparency/log_proofs_fetcher.h"
+#include "net/cert/ct_log_verifier.h"
+#include "net/cert/signed_certificate_timestamp.h"
+#include "net/cert/signed_tree_head.h"
+
+namespace certificate_transparency {
+
+NewSCTsObserver::NewSCTsObserver(LogProofsFetcher* fetcher)
+ : fetcher_(fetcher) {
+}
+
+NewSCTsObserver::~NewSCTsObserver() {
+}
+
+void NewSCTsObserver::OnSCTVerified(
+ const net::ct::SignedCertificateTimestamp* sct,
+ net::CTLogVerifier* verifier) {
+ VLOG(0) << "Verified SCT observed.";
+ // 1st step: Check if an sth for the log with this ID exists. If not, fetch.
+ // 2nd step: Check if timestamp in sct > timestamp in sth. If yes, fetch
+ // fresher STH.
davidben 2015/05/07 21:59:38 (I'm assuming this is to be filled in later.)
Eran Messeri 2015/07/10 13:15:48 Correct, for now there's no point in even storing
+}
+
+} // namespace certificate_transparency

Powered by Google App Engine
This is Rietveld 408576698