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

Unified Diff: net/base/cert_verify_proc_win.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_unittest.cc ('k') | net/base/cert_verify_result.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verify_proc_win.cc
===================================================================
--- net/base/cert_verify_proc_win.cc (revision 150506)
+++ net/base/cert_verify_proc_win.cc (working copy)
@@ -4,9 +4,6 @@
#include "net/base/cert_verify_proc_win.h"
-#include <string>
-#include <vector>
-
#include "base/memory/scoped_ptr.h"
#include "base/sha1.h"
#include "base/string_util.h"
@@ -285,7 +282,7 @@
PCERT_CHAIN_ELEMENT* element = first_chain->rgpElement;
PCCERT_CONTEXT cert = element[num_elements - 1]->pCertContext;
- SHA1HashValue hash = X509Certificate::CalculateFingerprint(cert);
+ SHA1Fingerprint hash = X509Certificate::CalculateFingerprint(cert);
return IsSHA1HashInSortedArray(
hash, &kKnownRootCertSHA1Hashes[0][0], sizeof(kKnownRootCertSHA1Hashes));
}
@@ -444,7 +441,7 @@
}
void AppendPublicKeyHashes(PCCERT_CHAIN_CONTEXT chain,
- std::vector<HashValueVector>* hashes) {
+ std::vector<SHA1Fingerprint>* hashes) {
if (chain->cChain == 0)
return;
@@ -462,16 +459,10 @@
if (!asn1::ExtractSPKIFromDERCert(der_bytes, &spki_bytes))
continue;
- HashValue sha1;
- sha1.tag = HASH_VALUE_SHA1;
+ SHA1Fingerprint hash;
base::SHA1HashBytes(reinterpret_cast<const uint8*>(spki_bytes.data()),
- spki_bytes.size(), sha1.data());
- (*hashes)[HASH_VALUE_SHA1].push_back(sha1);
-
- HashValue sha256;
- sha256.tag = HASH_VALUE_SHA256;
- crypto::SHA256HashString(spki_bytes, sha1.data(), crypto::kSHA256Length);
- (*hashes)[HASH_VALUE_SHA256].push_back(sha256);
+ spki_bytes.size(), hash.data);
+ hashes->push_back(hash);
}
}
@@ -512,7 +503,7 @@
// Look up the EV policy OID of the root CA.
PCCERT_CONTEXT root_cert = element[num_elements - 1]->pCertContext;
- SHA1HashValue fingerprint =
+ SHA1Fingerprint fingerprint =
X509Certificate::CalculateFingerprint(root_cert);
EVRootCAMetadata* metadata = EVRootCAMetadata::GetInstance();
return metadata->HasEVPolicyOID(fingerprint, policy_oid);
« no previous file with comments | « net/base/cert_verify_proc_unittest.cc ('k') | net/base/cert_verify_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698