summaryrefslogtreecommitdiff
path: root/chromium/net/url_request/fraudulent_certificate_reporter.h
blob: 007f660d98d55239fe531e46f8f5df72d4274101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_
#define NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_

#include <string>

namespace net {

class SSLInfo;

// FraudulentCertificateReporter is an interface for asynchronously
// reporting certificate chains that fail the certificate pinning
// check.
class FraudulentCertificateReporter {
 public:
  virtual ~FraudulentCertificateReporter() {}

  // Sends a report to the report collection server containing the |ssl_info|
  // associated with a connection to |hostname|. If |sni_available| is true,
  // searches the SNI transport security metadata as well as the usual
  // transport security metadata when determining policy for sending the report.
  virtual void SendReport(const std::string& hostname,
                          const SSLInfo& ssl_info,
                          bool sni_available) = 0;
};

}  // namespace net

#endif  // NET_URL_REQUEST_FRAUDULENT_CERTIFICATE_REPORTER_H_