OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SOCKET_DNS_CERT_PROVENANCE_CHECKER_H | 5 #ifndef NET_SOCKET_DNS_CERT_PROVENANCE_CHECKER_H |
6 #define NET_SOCKET_DNS_CERT_PROVENANCE_CHECKER_H | 6 #define NET_SOCKET_DNS_CERT_PROVENANCE_CHECKER_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
12 #include "net/base/net_api.h" | 12 #include "net/base/net_export.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 class DnsRRResolver; | 16 class DnsRRResolver; |
17 | 17 |
18 // DnsCertProvenanceChecker is an interface for asynchronously checking HTTPS | 18 // DnsCertProvenanceChecker is an interface for asynchronously checking HTTPS |
19 // certificates via a DNS side-channel. | 19 // certificates via a DNS side-channel. |
20 class NET_API DnsCertProvenanceChecker { | 20 class NET_EXPORT DnsCertProvenanceChecker { |
21 public: | 21 public: |
22 class NET_API Delegate { | 22 class NET_EXPORT Delegate { |
23 public: | 23 public: |
24 virtual ~Delegate(); | 24 virtual ~Delegate(); |
25 | 25 |
26 virtual void OnDnsCertLookupFailed( | 26 virtual void OnDnsCertLookupFailed( |
27 const std::string& hostname, | 27 const std::string& hostname, |
28 const std::vector<std::string>& der_certs) = 0; | 28 const std::vector<std::string>& der_certs) = 0; |
29 }; | 29 }; |
30 | 30 |
31 virtual ~DnsCertProvenanceChecker(); | 31 virtual ~DnsCertProvenanceChecker(); |
32 | 32 |
(...skipping 21 matching lines...) Expand all Loading... |
54 // HTTPS failure, it would seem silly to use HTTPS to protect the uploaded | 54 // HTTPS failure, it would seem silly to use HTTPS to protect the uploaded |
55 // report. | 55 // report. |
56 static std::string BuildEncryptedReport( | 56 static std::string BuildEncryptedReport( |
57 const std::string& hostname, | 57 const std::string& hostname, |
58 const std::vector<std::string>& der_certs); | 58 const std::vector<std::string>& der_certs); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace net | 61 } // namespace net |
62 | 62 |
63 #endif // NET_SOCKET_DNS_CERT_PROVENANCE_CHECK_H | 63 #endif // NET_SOCKET_DNS_CERT_PROVENANCE_CHECK_H |
OLD | NEW |