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

Side by Side Diff: components/certificate_transparency/tree_state_tracker.h

Issue 1845113003: Certificate Transparency: Start tracking logs' state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing plumbing bits Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CERTIFICATE_TRANSPARENCY_TREE_STATE_TRACKER_H_
6 #define COMPONENTS_CERTIFICATE_TRANSPARENCY_TREE_STATE_TRACKER_H_
7
8 #include <map>
9 #include <memory>
10 #include <string>
11 #include <vector>
12
13 #include "base/memory/ref_counted.h"
14 #include "net/cert/ct_verifier.h"
15 #include "net/cert/sth_observer.h"
16
17 namespace net {
18 class CTLogVerifier;
19 class X509Certificate;
20
21 namespace ct {
22 struct SignedCertificateTimestamp;
23 struct SignedTreeHead;
24 } // namespace ct
25
26 } // namespace net
27
28 namespace certificate_transparency {
29 class SingleTreeTracker;
30
31 // Entry point for handling notification of new STHs/SCTs for a particular
32 // browsing session.
Ryan Sleevi 2016/05/09 17:03:49 Again, more documentation
Eran Messeri 2016/05/10 20:01:10 Done.
33 // TODO(eranm): Export the inclusion check status of SCTs+Certs so it can
34 // be used in the DevTools Security panel, for example - crbug.com/506227
35 class TreeStateTracker : public net::CTVerifier::Observer,
36 public net::ct::STHObserver {
37 public:
38 explicit TreeStateTracker(
39 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs);
40 ~TreeStateTracker() override;
41
42 // net::ct::CTVerifier::Observer implementation.
43 // Delegates to the tree tracker corresponding to the log that issued the SCT.
44 void OnSCTVerified(net::X509Certificate* cert,
45 const net::ct::SignedCertificateTimestamp* sct) override;
46
47 // net::ct::STHObserver implementation.
48 // Delegates to the tree tracker corresponding to the log that issued the STH.
49 void NewSTHObserved(const net::ct::SignedTreeHead& sth) override;
50
51 private:
52 // Holds the SingleTreeTracker for each log
53 std::map<std::string, std::unique_ptr<SingleTreeTracker>> tree_trackers_;
54
55 DISALLOW_COPY_AND_ASSIGN(TreeStateTracker);
56 };
57
58 } // namespace certificate_transparency
59
60 #endif // COMPONENTS_CERTIFICATE_TRANSPARENCY_TREE_STATE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698