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

Unified Diff: net/cert/cert_verify_proc_nss.cc

Issue 2951343002: Remove residual support for SHA-1 public key pins. (Closed)
Patch Set: Remove the rest of HASH_VALUE_SHA1; respond to comments. Created 3 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/cert/cert_verify_proc_nss.cc
diff --git a/net/cert/cert_verify_proc_nss.cc b/net/cert/cert_verify_proc_nss.cc
index ec943556efef6dca2b5b715ec90a73fe8b0acebd..e3337a57547d6a372ad1b2b5bdfb15595c73beb3 100644
--- a/net/cert/cert_verify_proc_nss.cc
+++ b/net/cert/cert_verify_proc_nss.cc
@@ -615,14 +615,6 @@ SECOidTag GetFirstCertPolicy(CERTCertificate* cert_handle) {
return SECOID_AddEntry(&od);
}
-HashValue CertPublicKeyHashSHA1(CERTCertificate* cert) {
- HashValue hash(HASH_VALUE_SHA1);
- SECStatus rv = HASH_HashBuf(HASH_AlgSHA1, hash.data(),
- cert->derPublicKey.data, cert->derPublicKey.len);
- DCHECK_EQ(SECSuccess, rv);
- return hash;
-}
-
HashValue CertPublicKeyHashSHA256(CERTCertificate* cert) {
HashValue hash(HASH_VALUE_SHA256);
SECStatus rv = HASH_HashBuf(HASH_AlgSHA256, hash.data(),
@@ -637,11 +629,9 @@ void AppendPublicKeyHashes(CERTCertList* cert_list,
for (CERTCertListNode* node = CERT_LIST_HEAD(cert_list);
!CERT_LIST_END(node, cert_list);
node = CERT_LIST_NEXT(node)) {
- hashes->push_back(CertPublicKeyHashSHA1(node->cert));
hashes->push_back(CertPublicKeyHashSHA256(node->cert));
}
if (root_cert) {
- hashes->push_back(CertPublicKeyHashSHA1(root_cert));
hashes->push_back(CertPublicKeyHashSHA256(root_cert));
}
}

Powered by Google App Engine
This is Rietveld 408576698