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

Unified Diff: chrome/browser/net/packed_ct_ev_whitelist.cc

Issue 657613002: Certificate Transparency: EV certificates whitelist support for ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ev_list_unpacking_redo
Patch Set: Addressing review comments (comment & formatting) Created 6 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
« no previous file with comments | « chrome/browser/net/packed_ct_ev_whitelist.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/packed_ct_ev_whitelist.cc
diff --git a/chrome/browser/net/packed_ct_ev_whitelist.cc b/chrome/browser/net/packed_ct_ev_whitelist.cc
index 9c22caede7579980858056c1d6fc6acd58f18da1..402838dd4afcf56027d9b0a91f2aa8ad860064e7 100644
--- a/chrome/browser/net/packed_ct_ev_whitelist.cc
+++ b/chrome/browser/net/packed_ct_ev_whitelist.cc
@@ -21,8 +21,9 @@ const uint8_t kCertHashLengthBits = 64; // 8 bytes
const uint8_t kCertHashLength = kCertHashLengthBits / 8;
const uint64_t kGolombMParameterBits = 47; // 2^47
-void SetNewEVWhitelistInSSLConfigService(
+void SetEVWhitelistInSSLConfigService(
const scoped_refptr<net::ct::EVCertsWhitelist>& new_whitelist) {
+ VLOG(1) << "Setting new EV Certs whitelist.";
net::SSLConfigService::SetEVCertsWhitelist(new_whitelist);
}
@@ -37,24 +38,14 @@ int TruncatedHashesComparator(const void* v1, const void* v2) {
}
} // namespace
-void SetEVWhitelistFromFile(const base::FilePath& compressed_whitelist_file) {
- VLOG(1) << "Setting EV whitelist from file: "
- << compressed_whitelist_file.value();
- std::string compressed_list;
- if (!base::ReadFileToString(compressed_whitelist_file, &compressed_list)) {
- VLOG(1) << "Failed reading from " << compressed_whitelist_file.value();
- return;
- }
-
- scoped_refptr<net::ct::EVCertsWhitelist> new_whitelist(
- new PackedEVCertsWhitelist(compressed_list));
- if (!new_whitelist->IsValid()) {
- VLOG(1) << "Failed uncompressing EV certs whitelist.";
+void SetEVCertsWhitelist(scoped_refptr<net::ct::EVCertsWhitelist> whitelist) {
+ if (!whitelist->IsValid()) {
+ VLOG(1) << "EV Certs whitelist is not valid, not setting.";
return;
}
base::Closure assign_cb =
- base::Bind(SetNewEVWhitelistInSSLConfigService, new_whitelist);
+ base::Bind(SetEVWhitelistInSSLConfigService, whitelist);
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE, assign_cb);
}
« no previous file with comments | « chrome/browser/net/packed_ct_ev_whitelist.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698