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

Side by Side Diff: net/url_request/fraudulent_certificate_reporter.h

Issue 935663004: Add checkbox for reporting invalid TLS/SSL cert chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add report-sending callback for browser tests Created 5 years, 9 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 (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_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_ 5 #ifndef NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_
6 #define NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_ 6 #define NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace net { 10 namespace net {
11 11
12 class SSLInfo; 12 class SSLInfo;
13 13
14 // FraudulentCertificateReporter is an interface for asynchronously 14 // FraudulentCertificateReporter is an interface for asynchronously
15 // reporting certificate chains that fail the certificate pinning 15 // reporting certificate chains that fail the certificate pinning
16 // check. 16 // check.
17 class FraudulentCertificateReporter { 17 class FraudulentCertificateReporter {
18 public: 18 public:
19 // The type of a report: either a pinning violation on a google.com
Ryan Sleevi 2015/03/03 19:16:39 This is a bit of a layering violation (or more apt
20 // site, or a report of an invalid SSL certificate chain (sent as part
21 // of the extended reporting program).
22 enum ReportType { REPORT_TYPE_PIN_VIOLATION, REPORT_TYPE_EXTENDED_REPORTING };
23
19 virtual ~FraudulentCertificateReporter() {} 24 virtual ~FraudulentCertificateReporter() {}
20 25
21 // Sends a report to the report collection server containing the |ssl_info| 26 // Sends a report of the given |type| to the report collection server,
22 // associated with a connection to |hostname|. 27 // containing the |ssl_info| associated with a connection to
23 virtual void SendReport(const std::string& hostname, 28 // |hostname|. |type| determines the format of the report to be sent
29 // and the endpoint that it gets sent to.
30 virtual void SendReport(ReportType type,
31 const std::string& hostname,
24 const SSLInfo& ssl_info) = 0; 32 const SSLInfo& ssl_info) = 0;
25 }; 33 };
26 34
27 } // namespace net 35 } // namespace net
28 36
29 #endif // NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_ 37 #endif // NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698