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

Side by Side Diff: net/http/transport_security_reporter.h

Issue 1212613004: Build and send HPKP violation reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rsleevi comments Created 5 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_HTTP_TRANSPORT_SECURITY_REPORTER_H_
6 #define NET_HTTP_TRANSPORT_SECURITY_REPORTER_H_
7
8 #include <string>
9
10 #include "net/http/certificate_report_sender_impl.h"
11 #include "net/http/transport_security_state.h"
12
13 class GURL;
14
15 namespace net {
16
17 class SSLInfo;
18 class URLRequestContext;
19
20 // Builds, serializes, and sends violation reports detected by
21 // TransportSecurityState.
22 class NET_EXPORT TransportSecurityReporter
23 : public TransportSecurityState::Reporter {
24 public:
25 TransportSecurityReporter(TransportSecurityState* state,
26 scoped_ptr<CertificateReportSender> report_sender);
27 ~TransportSecurityReporter() override;
28
29 // TransportSecurityState::Reporter overrides
30 bool GetHPKPReportUri(const TransportSecurityState::PKPState& pkp_state,
31 GURL* report_uri) override;
32 bool BuildHPKPReport(const std::string& hostname,
33 uint16_t port,
34 const base::Time& expiry,
35 bool include_subdomains,
36 const std::string& effective_hostname,
37 const X509Certificate* served_certificate_chain,
38 const X509Certificate* validated_certificate_chain,
39 const HashValueVector& spki_hashes,
40 std::string* serialized_report) override;
41 void SendHPKPReport(const GURL& report_uri,
42 const std::string& report) override;
43
44 private:
45 TransportSecurityState* transport_security_state_;
46 scoped_ptr<CertificateReportSender> report_sender_;
47 };
48
49 } // namespace net
50
51 #endif // NET_HTTP_TRANSPORT_SECURITY_REPORTER_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/transport_security_reporter.cc » ('j') | net/http/transport_security_state.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698