| Index: chrome/browser/safe_browsing/download_protection_service_unittest.cc
|
| diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
|
| index 8785fa0a749b601b2dbe7e27059cceb090203933..8ce9026f13bba0ec61c589b97320a9d56bf0bfd3 100644
|
| --- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
|
| +++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
|
| @@ -23,6 +23,7 @@
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/path_service.h"
|
| #include "base/run_loop.h"
|
| +#include "base/sha1.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/threading/sequenced_worker_pool.h"
|
| #include "chrome/browser/history/history_service_factory.h"
|
| @@ -1731,9 +1732,12 @@ TEST_F(DownloadProtectionServiceTest, GetCertificateWhitelistStrings) {
|
| scoped_refptr<net::X509Certificate> issuer_cert(
|
| ReadTestCertificate("issuer.pem"));
|
| ASSERT_TRUE(issuer_cert.get());
|
| - std::string cert_base = "cert/" + base::HexEncode(
|
| - issuer_cert->fingerprint().data,
|
| - sizeof(issuer_cert->fingerprint().data));
|
| + std::string issuer_der;
|
| + net::X509Certificate::GetDEREncoded(issuer_cert->os_cert_handle(),
|
| + &issuer_der);
|
| + std::string hashed = base::SHA1HashString(issuer_der);
|
| + std::string cert_base =
|
| + "cert/" + base::HexEncode(hashed.data(), hashed.size());
|
|
|
| scoped_refptr<net::X509Certificate> cert(ReadTestCertificate("test_cn.pem"));
|
| ASSERT_TRUE(cert.get());
|
|
|