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

Unified Diff: chromeos/network/onc/onc_certificate_importer_impl_unittest.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
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | content/browser/cert_store_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
diff --git a/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc b/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
index fedf6d54f91ea9e0b69d4146be228fefba363f21..aa148e4257f183f89e0ad616cc654b90d965e3eb 100644
--- a/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
+++ b/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
@@ -20,6 +20,7 @@
#include "components/onc/onc_constants.h"
#include "crypto/scoped_test_nss_db.h"
#include "net/base/crypto_module.h"
+#include "net/base/hash_value.h"
#include "net/cert/cert_type.h"
#include "net/cert/nss_cert_database_chromeos.h"
#include "net/cert/x509_certificate.h"
@@ -182,8 +183,15 @@ class ONCCertificateImporterImplTest : public testing::Test {
}
CERT_DestroyCertList(cert_list);
- // Sort the result so that test comparisons can be deterministic.
- std::sort(result.begin(), result.end(), net::X509Certificate::LessThan());
+ std::sort(result.begin(), result.end(),
+ [](const scoped_refptr<net::X509Certificate>& lhs,
+ const scoped_refptr<net::X509Certificate>& rhs) {
+ return net::SHA256HashValueLessThan()(
+ net::X509Certificate::CalculateFingerprint256(
+ lhs->os_cert_handle()),
+ net::X509Certificate::CalculateFingerprint256(
+ rhs->os_cert_handle()));
+ });
return result;
}
};
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | content/browser/cert_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698