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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 10827104: Revert 149261 - Support SHA-256 in public key pins for HTTPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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: chrome/browser/ui/webui/net_internals/net_internals_ui.cc
===================================================================
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc (revision 149267)
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc (working copy)
@@ -1087,32 +1087,18 @@
connection_tester_->RunAllTests(url);
}
-void SPKIHashesToString(const net::HashValueVector& hashes,
+void SPKIHashesToString(const net::FingerprintVector& hashes,
std::string* string) {
- for (net::HashValueVector::const_iterator
+ for (net::FingerprintVector::const_iterator
i = hashes.begin(); i != hashes.end(); ++i) {
- std::string label;
- switch (i->tag) {
- case net::HASH_VALUE_SHA1:
- label = "sha1/";
- break;
- case net::HASH_VALUE_SHA256:
- label = "sha256/";
- break;
- default:
- NOTREACHED();
- LOG(WARNING) << "Invalid fingerprint of unknown type " << i->tag;
- label = "unknown/";
- }
-
- base::StringPiece hash_str(reinterpret_cast<const char*>(i->data()),
- i->size());
+ base::StringPiece hash_str(reinterpret_cast<const char*>(i->data),
+ arraysize(i->data));
std::string encoded;
base::Base64Encode(hash_str, &encoded);
if (i != hashes.begin())
*string += ",";
- *string += label + encoded;
+ *string += "sha1/" + encoded;
}
}
@@ -1188,7 +1174,7 @@
i = type_and_b64s.begin(); i != type_and_b64s.end(); i++) {
std::string type_and_b64;
RemoveChars(*i, " \t\r\n", &type_and_b64);
- net::HashValue hash;
+ net::SHA1Fingerprint hash;
if (!net::TransportSecurityState::ParsePin(type_and_b64, &hash))
continue;

Powered by Google App Engine
This is Rietveld 408576698