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

Side by Side Diff: net/cert/ct_verifier.h

Issue 1845113003: Certificate Transparency: Start tracking logs' state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments, test improvement 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 NET_CERT_CT_VERIFIER_H_ 5 #ifndef NET_CERT_CT_VERIFIER_H_
6 #define NET_CERT_CT_VERIFIER_H_ 6 #define NET_CERT_CT_VERIFIER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 // Called for each Signed Certificate Timestamp from a known log that vas 29 // Called for each Signed Certificate Timestamp from a known log that vas
30 // verified successfully (i.e. the signature verifies). |sct| is the 30 // verified successfully (i.e. the signature verifies). |sct| is the
31 // Signed Certificate Timestamp, |cert| is the certificate it applies to. 31 // Signed Certificate Timestamp, |cert| is the certificate it applies to.
32 // The certificate is needed to calculate the hash of the log entry, 32 // The certificate is needed to calculate the hash of the log entry,
33 // necessary for checking inclusion in the log. 33 // necessary for checking inclusion in the log.
34 // Note: The observer (whose implementation is expected to exist outside 34 // Note: The observer (whose implementation is expected to exist outside
35 // net/) may store the observed |cert| and |sct|. 35 // net/) may store the observed |cert| and |sct|.
36 virtual void OnSCTVerified(X509Certificate* cert, 36 virtual void OnSCTVerified(X509Certificate* cert,
37 const ct::SignedCertificateTimestamp* sct) = 0; 37 const ct::SignedCertificateTimestamp* sct) = 0;
38
39 protected:
40 virtual ~Observer() {}
38 }; 41 };
39 42
40 virtual ~CTVerifier() {} 43 virtual ~CTVerifier() {}
41 44
42 // Verifies SCTs embedded in the certificate itself, SCTs embedded in a 45 // Verifies SCTs embedded in the certificate itself, SCTs embedded in a
43 // stapled OCSP response, and SCTs obtained via the 46 // stapled OCSP response, and SCTs obtained via the
44 // signed_certificate_timestamp TLS extension on the given |cert|. 47 // signed_certificate_timestamp TLS extension on the given |cert|.
45 // A certificate is permitted but not required to use multiple sources for 48 // A certificate is permitted but not required to use multiple sources for
46 // SCTs. It is expected that most certificates will use only one source 49 // SCTs. It is expected that most certificates will use only one source
47 // (embedding, TLS extension or OCSP stapling). If no stapled OCSP response 50 // (embedding, TLS extension or OCSP stapling). If no stapled OCSP response
(...skipping 10 matching lines...) Expand all
58 // Registers |observer| to receive notifications of validated SCTs. Does not 61 // Registers |observer| to receive notifications of validated SCTs. Does not
59 // take ownership of the observer as the observer may be performing 62 // take ownership of the observer as the observer may be performing
60 // URLRequests which have to be cancelled before this object is destroyed. 63 // URLRequests which have to be cancelled before this object is destroyed.
61 // Setting |observer| to nullptr has the effect of stopping all notifications. 64 // Setting |observer| to nullptr has the effect of stopping all notifications.
62 virtual void SetObserver(Observer* observer) = 0; 65 virtual void SetObserver(Observer* observer) = 0;
63 }; 66 };
64 67
65 } // namespace net 68 } // namespace net
66 69
67 #endif // NET_CERT_CT_VERIFIER_H_ 70 #endif // NET_CERT_CT_VERIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698