| 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..1fa8557d8a916dad437d7a324174268f2c65bb68
|
| --- /dev/null
|
| +++ b/net/http/transport_security_reporter.h
|
| @@ -0,0 +1,53 @@
|
| +// 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 GetHPKPReportUri(
|
| + const TransportSecurityState::DomainState::PKPState& pkp_state,
|
| + GURL* report_uri) override;
|
| + bool BuildHPKPReport(
|
| + const std::string& hostname,
|
| + uint16_t port,
|
| + const base::Time& expiry,
|
| + bool include_subdomains,
|
| + const std::string& effective_hostname,
|
| + const scoped_refptr<X509Certificate>& served_certificate_chain,
|
| + const scoped_refptr<X509Certificate>& validated_certificate_chain,
|
| + const HashValueVector& spki_hashes,
|
| + 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_
|
|
|