Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef COMPONENTS_CERTIFICATE_TRANSPARENCY_SINGLE_TREE_TRACKER_H_ | 5 #ifndef COMPONENTS_CERTIFICATE_TRANSPARENCY_SINGLE_TREE_TRACKER_H_ |
| 6 #define COMPONENTS_CERTIFICATE_TRANSPARENCY_SINGLE_TREE_TRACKER_H_ | 6 #define COMPONENTS_CERTIFICATE_TRANSPARENCY_SINGLE_TREE_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "net/cert/ct_verifier.h" | 13 #include "net/cert/ct_verifier.h" |
| 14 #include "net/cert/signed_tree_head.h" | 14 #include "net/cert/signed_tree_head.h" |
| 15 #include "net/cert/sth_observer.h" | 15 #include "net/cert/sth_observer.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 class CTLogVerifier; | 18 class CTLogVerifier; |
| 19 class X509Certificate; | 19 class X509Certificate; |
| 20 | 20 |
| 21 namespace ct { | 21 namespace ct { |
| 22 struct SignedCertificateTimestamp; | 22 struct SignedCertificateTimestamp; |
| 23 } // namespace ct | 23 } // namespace ct |
| 24 | 24 |
| 25 } // namespace net | 25 } // namespace net |
| 26 | 26 |
| 27 namespace certificate_transparency { | 27 namespace certificate_transparency { |
| 28 | 28 |
| 29 namespace internal { | |
| 30 extern const char kCanCheckForInclusionHistogramName[]; | |
|
Ryan Sleevi
2016/07/20 20:34:00
This does feel unnecessary, and it doesn't sound l
Eran Messeri
2016/07/21 17:53:43
Done, duplicated in the test.
| |
| 31 } | |
| 32 | |
| 29 // Tracks the state of an individual Certificate Transparency Log's Merkle Tree. | 33 // Tracks the state of an individual Certificate Transparency Log's Merkle Tree. |
| 30 // A CT Log constantly issues Signed Tree Heads, for which every older STH must | 34 // A CT Log constantly issues Signed Tree Heads, for which every older STH must |
| 31 // be incorporated into the current/newer STH. As new certificates are logged, | 35 // be incorporated into the current/newer STH. As new certificates are logged, |
| 32 // new SCTs are produced, and eventually, those SCTs are incorporated into the | 36 // new SCTs are produced, and eventually, those SCTs are incorporated into the |
| 33 // log and a new STH is produced, with there being an inclusion proof between | 37 // log and a new STH is produced, with there being an inclusion proof between |
| 34 // the SCTs and the new STH, and a consistency proof between the old STH and the | 38 // the SCTs and the new STH, and a consistency proof between the old STH and the |
| 35 // new STH. | 39 // new STH. |
| 36 // This class receives STHs provided by/observed by the embedder, with the | 40 // This class receives STHs provided by/observed by the embedder, with the |
| 37 // assumption that STHs have been checked for consistency already. As SCTs are | 41 // assumption that STHs have been checked for consistency already. As SCTs are |
| 38 // observed, their status is checked against the latest STH to ensure they were | 42 // observed, their status is checked against the latest STH to ensure they were |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 // whole MerkleTreeLeaf (RFC6962, section 3.4.) as a key. See | 111 // whole MerkleTreeLeaf (RFC6962, section 3.4.) as a key. See |
| 108 // https://crbug.com/506227#c22 and https://crbug.com/613495 | 112 // https://crbug.com/506227#c22 and https://crbug.com/613495 |
| 109 std::map<base::Time, SCTInclusionStatus> entries_status_; | 113 std::map<base::Time, SCTInclusionStatus> entries_status_; |
| 110 | 114 |
| 111 DISALLOW_COPY_AND_ASSIGN(SingleTreeTracker); | 115 DISALLOW_COPY_AND_ASSIGN(SingleTreeTracker); |
| 112 }; | 116 }; |
| 113 | 117 |
| 114 } // namespace certificate_transparency | 118 } // namespace certificate_transparency |
| 115 | 119 |
| 116 #endif // COMPONENTS_CERTIFICATE_TRANSPARENCY_SINGLE_TREE_TRACKER_H_ | 120 #endif // COMPONENTS_CERTIFICATE_TRANSPARENCY_SINGLE_TREE_TRACKER_H_ |
| OLD | NEW |