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

Unified Diff: net/base/cert_verify_proc_openssl.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_openssl.cc
===================================================================
--- net/base/cert_verify_proc_openssl.cc (revision 142157)
+++ net/base/cert_verify_proc_openssl.cc (working copy)
@@ -132,7 +132,7 @@
}
void AppendPublicKeyHashes(X509_STORE_CTX* store_ctx,
- std::vector<SHA1Fingerprint>* hashes) {
+ std::vector<Fingerprint>* hashes) {
STACK_OF(X509)* chain = X509_STORE_CTX_get_chain(store_ctx);
for (int i = 0; i < sk_X509_num(chain); ++i) {
X509* cert = sk_X509_value(chain, i);
@@ -146,9 +146,10 @@
if (!asn1::ExtractSPKIFromDERCert(der_bytes, &spki_bytes))
continue;
- SHA1Fingerprint hash;
+ Fingerprint hash;
+ hash.tag = FINGERPRINT_SHA1;
base::SHA1HashBytes(reinterpret_cast<const uint8*>(spki_bytes.data()),
- spki_bytes.size(), hash.data);
+ spki_bytes.size(), hash.data());
hashes->push_back(hash);
}
}

Powered by Google App Engine
This is Rietveld 408576698