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

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

Issue 1211933005: Initial (partial) implementation of HPKP violation reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style fixes, 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(
31 const TransportSecurityState::DomainState::PKPState& pkp_state,
32 GURL* report_uri) override;
33 bool BuildHPKPReport(
34 const std::string& hostname,
35 uint16_t port,
36 const base::Time& expiry,
37 bool include_subdomains,
38 const std::string& effective_hostname,
39 const scoped_refptr<X509Certificate>& served_certificate_chain,
40 const scoped_refptr<X509Certificate>& validated_certificate_chain,
41 const HashValueVector& spki_hashes,
42 std::string* serialized_report) override;
43 void SendHPKPReport(const GURL& report_uri,
44 const std::string& report) override;
45
46 private:
47 TransportSecurityState* transport_security_state_;
48 scoped_ptr<CertificateReportSender> report_sender_;
49 };
50
51 } // namespace net
52
53 #endif // NET_HTTP_TRANSPORT_SECURITY_REPORTER_H_
OLDNEW
« no previous file with comments | « net/http/transport_security_persister_unittest.cc ('k') | net/http/transport_security_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698