| Index: components/cronet/ct_ignores.h
|
| diff --git a/components/cronet/ct_ignores.h b/components/cronet/ct_ignores.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..33cd98c44446f9e5afafef290a373857491ed997
|
| --- /dev/null
|
| +++ b/components/cronet/ct_ignores.h
|
| @@ -0,0 +1,55 @@
|
| +// Copyright 2016 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 COMPONENTS_CRONET_CT_IGNORES_H_
|
| +#define COMPONENTS_CRONET_CT_IGNORES_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "net/cert/ct_policy_enforcer.h"
|
| +#include "net/cert/ct_verifier.h"
|
| +
|
| +namespace cronet {
|
| +
|
| +// A CTVerifier which ignores Certificate Transparency information.
|
| +class IgnoresCTVerifier : public net::CTVerifier {
|
| + public:
|
| + IgnoresCTVerifier() = default;
|
| + ~IgnoresCTVerifier() override = default;
|
| +
|
| + int Verify(net::X509Certificate* cert,
|
| + const std::string& stapled_ocsp_response,
|
| + const std::string& sct_list_from_tls_extension,
|
| + net::SignedCertificateTimestampAndStatusList* output_scts,
|
| + const net::NetLogWithSource& net_log) override;
|
| +
|
| + void SetObserver(Observer* observer) override;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(IgnoresCTVerifier);
|
| +};
|
| +
|
| +// A CTPolicyEnforcer that accepts all certificates.
|
| +class IgnoresCTPolicyEnforcer : public net::CTPolicyEnforcer {
|
| + public:
|
| + IgnoresCTPolicyEnforcer() = default;
|
| + ~IgnoresCTPolicyEnforcer() override = default;
|
| +
|
| + net::ct::CertPolicyCompliance DoesConformToCertPolicy(
|
| + net::X509Certificate* cert,
|
| + const net::SCTList& verified_scts,
|
| + const net::NetLogWithSource& net_log) override;
|
| +
|
| + net::ct::EVPolicyCompliance DoesConformToCTEVPolicy(
|
| + net::X509Certificate* cert,
|
| + const net::ct::EVCertsWhitelist* ev_whitelist,
|
| + const net::SCTList& verified_scts,
|
| + const net::NetLogWithSource& net_log) override;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(IgnoresCTPolicyEnforcer);
|
| +};
|
| +
|
| +} // namespace cronet
|
| +
|
| +#endif // COMPONENTS_CRONET_CT_IGNORES_H_
|
|
|