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

Unified Diff: net/base/cert_verify_proc_mac.cc

Issue 10545166: Support SHA-256 in public key pins for HTTPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
Index: net/base/cert_verify_proc_mac.cc
===================================================================
--- net/base/cert_verify_proc_mac.cc (revision 142157)
+++ net/base/cert_verify_proc_mac.cc (working copy)
@@ -231,7 +231,7 @@
}
void AppendPublicKeyHashes(CFArrayRef chain,
- std::vector<SHA1Fingerprint>* hashes) {
+ std::vector<Fingerprint>* hashes) {
const CFIndex n = CFArrayGetCount(chain);
for (CFIndex i = 0; i < n; i++) {
SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(
@@ -246,8 +246,9 @@
if (!asn1::ExtractSPKIFromDERCert(der_bytes, &spki_bytes))
continue;
- SHA1Fingerprint hash;
- CC_SHA1(spki_bytes.data(), spki_bytes.size(), hash.data);
+ Fingerprint hash;
+ hash.tag = FINGERPRINT_SHA1;
+ CC_SHA1(spki_bytes.data(), spki_bytes.size(), hash.data());
hashes->push_back(hash);
}
}

Powered by Google App Engine
This is Rietveld 408576698