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

Unified Diff: net/base/cert_verify_proc.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.h ('k') | net/base/cert_verify_proc_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verify_proc.cc
===================================================================
--- net/base/cert_verify_proc.cc (revision 150506)
+++ net/base/cert_verify_proc.cc (working copy)
@@ -217,9 +217,8 @@
}
// static
-// NOTE: This implementation assumes and enforces that the hashes are SHA1.
bool CertVerifyProc::IsPublicKeyBlacklisted(
- const std::vector<HashValueVector>& public_key_hashes) {
+ const std::vector<SHA1Fingerprint>& public_key_hashes) {
static const unsigned kNumHashes = 9;
static const uint8 kHashes[kNumHashes][base::kSHA1Length] = {
// Subject: CN=DigiNotar Root CA
@@ -264,14 +263,11 @@
0xd1, 0x72, 0xbd, 0x53, 0xe0, 0xd3, 0x07, 0x83, 0x4b, 0xd1},
};
- const HashValueVector& sha1_hashes = public_key_hashes[HASH_VALUE_SHA1];
for (unsigned i = 0; i < kNumHashes; i++) {
- for (HashValueVector::const_iterator j = sha1_hashes.begin();
- j != sha1_hashes.end(); ++j) {
- if (j->tag == HASH_VALUE_SHA1 &&
- memcmp(j->data(), kHashes[i], base::kSHA1Length) == 0) {
+ for (std::vector<SHA1Fingerprint>::const_iterator
+ j = public_key_hashes.begin(); j != public_key_hashes.end(); ++j) {
+ if (memcmp(j->data, kHashes[i], base::kSHA1Length) == 0)
return true;
- }
}
}
« no previous file with comments | « net/base/cert_verify_proc.h ('k') | net/base/cert_verify_proc_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698