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

Unified Diff: chrome/browser/safe_browsing/download_protection_service.cc

Issue 2000503002: Remove the fingerprint and ca_fingerprint from X509Certificate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_cache
Patch Set: Fix IDN test Created 4 years, 6 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: chrome/browser/safe_browsing/download_protection_service.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index 2705d4a06d909733006e6380de9fe5420ef457a0..2d88635a4fd2733e2efd96b5bf8bfdfcdddd9754 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -20,6 +20,7 @@
#include "base/metrics/sparse_histogram.h"
#include "base/rand_util.h"
#include "base/sequenced_task_runner_helpers.h"
+#include "base/sha1.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@@ -1675,8 +1676,10 @@ void DownloadProtectionService::GetCertificateWhitelistStrings(
paths_to_check.insert(ou_tokens[i]);
}
- std::string issuer_fp = base::HexEncode(issuer.fingerprint().data,
- sizeof(issuer.fingerprint().data));
+ std::string issuer_der;
+ net::X509Certificate::GetDEREncoded(issuer.os_cert_handle(), &issuer_der);
+ std::string hashed = base::SHA1HashString(issuer_der);
+ std::string issuer_fp = base::HexEncode(hashed.data(), hashed.size());
for (std::set<std::string>::iterator it = paths_to_check.begin();
it != paths_to_check.end(); ++it) {
whitelist_strings->push_back("cert/" + issuer_fp + *it);
« no previous file with comments | « blimp/net/exact_match_cert_verifier.cc ('k') | chrome/browser/safe_browsing/download_protection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698