| Index: chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/net_internals/net_internals_ui.cc (revision 186438)
|
| +++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc (working copy)
|
| @@ -1233,17 +1233,21 @@
|
|
|
| result->SetBoolean("result", found);
|
| if (found) {
|
| - result->SetInteger("mode", static_cast<int>(state.upgrade_mode));
|
| - result->SetBoolean("subdomains", state.include_subdomains);
|
| - result->SetString("domain", state.domain);
|
| - result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT());
|
| - result->SetDouble("dynamic_spki_hashes_expiry",
|
| - state.dynamic_spki_hashes_expiry.ToDoubleT());
|
| -
|
| - result->SetString("static_spki_hashes",
|
| - HashesToBase64String(state.static_spki_hashes));
|
| - result->SetString("dynamic_spki_hashes",
|
| - HashesToBase64String(state.dynamic_spki_hashes));
|
| + result->SetBoolean("HSTS", state.ShouldUpgradeToSSL());
|
| + if (state.HasPublicKeyPins()) {
|
| + const net::HashValueVector& good_hashes =
|
| + state.GetPublicKeyPinsGoodHashes();
|
| + const net::HashValueVector& bad_hashes =
|
| + state.GetPublicKeyPinsBadHashes();
|
| + if (!good_hashes.empty())
|
| + result->SetString("Public_Key_Pins_Good",
|
| + HashesToBase64String(
|
| + state.GetPublicKeyPinsGoodHashes()));
|
| + if (!bad_hashes.empty())
|
| + result->SetString("Public_Key_Pins_Bad",
|
| + HashesToBase64String(
|
| + state.GetPublicKeyPinsBadHashes()));
|
| + }
|
| }
|
| }
|
| }
|
| @@ -1271,15 +1275,16 @@
|
| if (!transport_security_state)
|
| return;
|
|
|
| - base::Time expiry = base::Time::Now() + base::TimeDelta::FromDays(1000);
|
| + base::Time now = base::Time::Now();
|
| + base::Time expiry = now + base::TimeDelta::FromDays(1000);
|
| net::HashValueVector hashes;
|
| if (!hashes_str.empty()) {
|
| if (!Base64StringToHashes(hashes_str, &hashes))
|
| return;
|
| }
|
|
|
| - transport_security_state->AddHSTS(domain, expiry, include_subdomains);
|
| - transport_security_state->AddHPKP(domain, expiry, include_subdomains,
|
| + transport_security_state->AddHSTS(domain, now, expiry, include_subdomains);
|
| + transport_security_state->AddHPKP(domain, now, expiry, include_subdomains,
|
| hashes);
|
| }
|
|
|
|
|