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

Unified Diff: components/cronet/ct_ignores.h

Issue 2493863002: [Cronet] Ignore Certificate Transparency to avoid CT log expiration. (Closed)
Patch Set: Use IgnoresCTVerifier / PolicyEnforcer on iOS. Created 4 years, 1 month 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
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_

Powered by Google App Engine
This is Rietveld 408576698