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

Unified Diff: net/cert/ct_ev_whitelist.cc

Issue 547603002: Certificate Transparency: Code for unpacking EV cert hashes whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoiding globals in favour of passing the SSLConfigService around Created 6 years, 3 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
Index: net/cert/ct_ev_whitelist.cc
diff --git a/net/cert/ct_ev_whitelist.cc b/net/cert/ct_ev_whitelist.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b434418e65838ccf98ac3e294b89dd6101baf086
--- /dev/null
+++ b/net/cert/ct_ev_whitelist.cc
@@ -0,0 +1,44 @@
+// Copyright 2014 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.
+
+#include "net/cert/ct_ev_whitelist.h"
+
+#include <set>
+
+#include "base/big_endian.h"
+#include "base/lazy_instance.h"
+
+namespace net {
+
+namespace ct {
+
+class DefaultEVCertsWhitelist : public EVCertsWhitelist {
+ public:
+ DefaultEVCertsWhitelist() {}
+
+ virtual bool ContainsCertificateHash(
+ const std::string& certificate_hash) const OVERRIDE {
+ return true;
+ }
+
+ virtual bool IsValid() const OVERRIDE { return true; }
+
+ private:
+ virtual ~DefaultEVCertsWhitelist() {}
+};
+
+namespace {
+
+base::LazyInstance<DefaultEVCertsWhitelist>::Leaky g_default_ev_whitelist =
+ LAZY_INSTANCE_INITIALIZER;
+
+} // namespace
+
+EVCertsWhitelist* GetDefaultEVCertsWhitelist() {
+ return &(g_default_ev_whitelist.Get());
+}
+
+} // namespace ct
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698