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

Unified Diff: net/base/cert_verify_proc_unittest.cc

Issue 10836150: Revert 150375 - Implement SHA-256 fingerprint support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « net/base/cert_verify_proc_openssl.cc ('k') | net/base/cert_verify_proc_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verify_proc_unittest.cc
===================================================================
--- net/base/cert_verify_proc_unittest.cc (revision 150506)
+++ net/base/cert_verify_proc_unittest.cc (working copy)
@@ -120,7 +120,7 @@
ASSERT_NE(static_cast<X509Certificate*>(NULL), paypal_null_cert);
- const SHA1HashValue& fingerprint =
+ const SHA1Fingerprint& fingerprint =
paypal_null_cert->fingerprint();
for (size_t i = 0; i < 20; ++i)
EXPECT_EQ(paypal_null_fingerprint[i], fingerprint.data[i]);
@@ -397,13 +397,11 @@
std::string spki_sha1 = base::SHA1HashString(spki.as_string());
- std::vector<HashValueVector> public_keys(HASH_VALUE_TAGS_COUNT);
- public_keys[HASH_VALUE_SHA1] = HashValueVector();
- HashValue fingerprint;
- fingerprint.tag = HASH_VALUE_SHA1;
- ASSERT_EQ(fingerprint.size(), spki_sha1.size());
- memcpy(fingerprint.data(), spki_sha1.data(), spki_sha1.size());
- public_keys[HASH_VALUE_SHA1].push_back(fingerprint);
+ std::vector<SHA1Fingerprint> public_keys;
+ SHA1Fingerprint fingerprint;
+ ASSERT_EQ(sizeof(fingerprint.data), spki_sha1.size());
+ memcpy(fingerprint.data, spki_sha1.data(), spki_sha1.size());
+ public_keys.push_back(fingerprint);
EXPECT_TRUE(CertVerifyProc::IsPublicKeyBlacklisted(public_keys)) <<
"Public key not blocked for " << kDigiNotarFilenames[i];
@@ -455,14 +453,10 @@
int error = Verify(cert_chain, "cert.se", flags, NULL, &verify_result);
EXPECT_EQ(OK, error);
EXPECT_EQ(0U, verify_result.cert_status);
- ASSERT_LE(static_cast<size_t>(HASH_VALUE_TAGS_COUNT),
- verify_result.public_key_hashes.size());
- const HashValueVector& sha1_hashes =
- verify_result.public_key_hashes[HASH_VALUE_SHA1];
- ASSERT_LE(3u, sha1_hashes.size());
- for (unsigned i = 0; i < 3; ++i) {
+ ASSERT_LE(3u, verify_result.public_key_hashes.size());
+ for (unsigned i = 0; i < 3; i++) {
EXPECT_EQ(HexEncode(kCertSESPKIs[i], base::kSHA1Length),
- HexEncode(sha1_hashes[i].data(), base::kSHA1Length));
+ HexEncode(verify_result.public_key_hashes[i].data, base::kSHA1Length));
}
}
« no previous file with comments | « net/base/cert_verify_proc_openssl.cc ('k') | net/base/cert_verify_proc_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698