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

Unified Diff: net/base/cert_verify_proc_mac.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.cc ('k') | net/base/cert_verify_proc_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verify_proc_mac.cc
===================================================================
--- net/base/cert_verify_proc_mac.cc (revision 150506)
+++ net/base/cert_verify_proc_mac.cc (working copy)
@@ -8,9 +8,6 @@
#include <CoreServices/CoreServices.h>
#include <Security/Security.h>
-#include <string>
-#include <vector>
-
#include "base/logging.h"
#include "base/mac/mac_logging.h"
#include "base/mac/scoped_cftyperef.h"
@@ -234,7 +231,7 @@
}
void AppendPublicKeyHashes(CFArrayRef chain,
- std::vector<HashValueVector>* hashes) {
+ std::vector<SHA1Fingerprint>* hashes) {
const CFIndex n = CFArrayGetCount(chain);
for (CFIndex i = 0; i < n; i++) {
SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(
@@ -249,15 +246,9 @@
if (!asn1::ExtractSPKIFromDERCert(der_bytes, &spki_bytes))
continue;
- HashValue sha1;
- sha1.tag = HASH_VALUE_SHA1;
- CC_SHA1(spki_bytes.data(), spki_bytes.size(), sha1.data());
- (*hashes)[HASH_VALUE_SHA1].push_back(sha1);
-
- HashValue sha256;
- sha256.tag = HASH_VALUE_SHA256;
- CC_SHA256(spki_bytes.data(), spki_bytes.size(), sha256.data());
- (*hashes)[HASH_VALUE_SHA256].push_back(sha256);
+ SHA1Fingerprint hash;
+ CC_SHA1(spki_bytes.data(), spki_bytes.size(), hash.data);
+ hashes->push_back(hash);
}
}
@@ -334,7 +325,7 @@
return false;
SecCertificateRef root_ref = reinterpret_cast<SecCertificateRef>(
const_cast<void*>(CFArrayGetValueAtIndex(chain, n - 1)));
- SHA1HashValue hash = X509Certificate::CalculateFingerprint(root_ref);
+ SHA1Fingerprint hash = X509Certificate::CalculateFingerprint(root_ref);
return IsSHA1HashInSortedArray(
hash, &kKnownRootCertSHA1Hashes[0][0], sizeof(kKnownRootCertSHA1Hashes));
}
« no previous file with comments | « net/base/cert_verify_proc.cc ('k') | net/base/cert_verify_proc_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698