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

Unified 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: combine GetHPKPReportUri() and BuildHPKPReport() into GetHPKPReport() 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/transport_security_reporter.cc » ('j') | net/http/transport_security_reporter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_reporter.h
diff --git a/net/http/transport_security_reporter.h b/net/http/transport_security_reporter.h
new file mode 100644
index 0000000000000000000000000000000000000000..28bcf57e8894d2cbb0330acae637e1695243c34d
--- /dev/null
+++ b/net/http/transport_security_reporter.h
@@ -0,0 +1,48 @@
+// Copyright 2015 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_HTTP_TRANSPORT_SECURITY_REPORTER_H_
+#define NET_HTTP_TRANSPORT_SECURITY_REPORTER_H_
+
+#include <string>
+
+#include "net/http/certificate_report_sender_impl.h"
+#include "net/http/transport_security_state.h"
+
+class GURL;
+
+namespace net {
+
+class SSLInfo;
+class URLRequestContext;
+
+// Builds, serializes, and sends violation reports detected by
+// TransportSecurityState.
+class NET_EXPORT TransportSecurityReporter
+ : public TransportSecurityState::Reporter {
+ public:
+ TransportSecurityReporter(TransportSecurityState* state,
+ scoped_ptr<CertificateReportSender> report_sender);
+ ~TransportSecurityReporter() override;
+
+ // TransportSecurityState::Reporter overrides
+ bool GetHPKPReport(const std::string& hostname,
+ const TransportSecurityState::PKPState& pkp_state,
+ bool is_static_pin,
+ uint16_t port,
+ const X509Certificate* served_certificate_chain,
+ const X509Certificate* validated_certificate_chain,
+ GURL* report_uri,
+ std::string* serialized_report) override;
+ void SendHPKPReport(const GURL& report_uri,
+ const std::string& report) override;
+
+ private:
+ TransportSecurityState* transport_security_state_;
+ scoped_ptr<CertificateReportSender> report_sender_;
+};
+
+} // namespace net
+
+#endif // NET_HTTP_TRANSPORT_SECURITY_REPORTER_H_
« no previous file with comments | « no previous file | net/http/transport_security_reporter.cc » ('j') | net/http/transport_security_reporter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698