OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ | 5 #ifndef CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ |
6 #define CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ | 6 #define CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // opt-in, only sending reports for certain hostnames, checking for | 56 // opt-in, only sending reports for certain hostnames, checking for |
57 // incognito mode, etc.). | 57 // incognito mode, etc.). |
58 // | 58 // |
59 // On some platforms (but not all), CertificateErrorReporter can use | 59 // On some platforms (but not all), CertificateErrorReporter can use |
60 // an HTTP endpoint to send encrypted extended reporting reports. On | 60 // an HTTP endpoint to send encrypted extended reporting reports. On |
61 // unsupported platforms, callers must send extended reporting reports | 61 // unsupported platforms, callers must send extended reporting reports |
62 // over SSL. | 62 // over SSL. |
63 virtual void SendExtendedReportingReport( | 63 virtual void SendExtendedReportingReport( |
64 const std::string& serialized_report); | 64 const std::string& serialized_report); |
65 | 65 |
66 // As |SendExtendedReportingReport|, but does not encrypt reports, | |
67 // since the pinning violation server is not capable of handling | |
68 // encrypted reports. | |
69 virtual void SendPinningViolationReport(const std::string& serialized_report); | |
70 | |
71 // Whether sending reports over HTTP is supported. | 66 // Whether sending reports over HTTP is supported. |
72 static bool IsHttpUploadUrlSupported(); | 67 static bool IsHttpUploadUrlSupported(); |
73 | 68 |
74 #if defined(USE_OPENSSL) | 69 #if defined(USE_OPENSSL) |
75 // Used by tests. | 70 // Used by tests. |
76 static bool DecryptCertificateErrorReport( | 71 static bool DecryptCertificateErrorReport( |
77 const uint8 server_private_key[32], | 72 const uint8 server_private_key[32], |
78 const EncryptedCertLoggerRequest& encrypted_report, | 73 const EncryptedCertLoggerRequest& encrypted_report, |
79 std::string* decrypted_serialized_report); | 74 std::string* decrypted_serialized_report); |
80 #endif | 75 #endif |
81 | 76 |
82 private: | 77 private: |
83 scoped_ptr<net::CertificateReportSender> certificate_report_sender_; | 78 scoped_ptr<net::CertificateReportSender> certificate_report_sender_; |
84 | 79 |
85 const GURL upload_url_; | 80 const GURL upload_url_; |
86 | 81 |
87 const uint8* server_public_key_; | 82 const uint8* server_public_key_; |
88 const uint32 server_public_key_version_; | 83 const uint32 server_public_key_version_; |
89 | 84 |
90 DISALLOW_COPY_AND_ASSIGN(CertificateErrorReporter); | 85 DISALLOW_COPY_AND_ASSIGN(CertificateErrorReporter); |
91 }; | 86 }; |
92 | 87 |
93 } // namespace chrome_browser_net | 88 } // namespace chrome_browser_net |
94 | 89 |
95 #endif // CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ | 90 #endif // CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ |
OLD | NEW |