| Index: components/security_state/core/security_state.cc
|
| diff --git a/components/security_state/core/security_state.cc b/components/security_state/core/security_state.cc
|
| index ef7e0a844148d8e10b4609fd30248b3c98263fa9..d12ea68c186b2e4aa579fe3f5677160fc9f1bb5f 100644
|
| --- a/components/security_state/core/security_state.cc
|
| +++ b/components/security_state/core/security_state.cc
|
| @@ -91,18 +91,7 @@ SHA1DeprecationStatus GetSHA1DeprecationStatus(
|
| net::CERT_STATUS_SHA1_SIGNATURE_PRESENT))
|
| return NO_DEPRECATED_SHA1;
|
|
|
| - // The internal representation of the dates for UI treatment of SHA-1.
|
| - // See http://crbug.com/401365 for details.
|
| - static const int64_t kJanuary2017 = INT64_C(13127702400000000);
|
| - if (visible_security_state.certificate->valid_expiry() >=
|
| - base::Time::FromInternalValue(kJanuary2017))
|
| - return DEPRECATED_SHA1_MAJOR;
|
| - static const int64_t kJanuary2016 = INT64_C(13096080000000000);
|
| - if (visible_security_state.certificate->valid_expiry() >=
|
| - base::Time::FromInternalValue(kJanuary2016))
|
| - return DEPRECATED_SHA1_MINOR;
|
| -
|
| - return NO_DEPRECATED_SHA1;
|
| + return DEPRECATED_SHA1;
|
| }
|
|
|
| ContentStatus GetContentStatus(bool displayed, bool ran) {
|
| @@ -172,14 +161,10 @@ SecurityLevel GetSecurityLevelForRequest(
|
| return SECURE_WITH_POLICY_INSTALLED_CERT;
|
|
|
| // In most cases, SHA1 use is treated as a certificate error, in which case
|
| - // DANGEROUS will have been returned above. If SHA1 is permitted, we downgrade
|
| - // the security level to Neutral or Dangerous depending on policy.
|
| - if (sha1_status == DEPRECATED_SHA1_MAJOR ||
|
| - sha1_status == DEPRECATED_SHA1_MINOR) {
|
| - return (visible_security_state.display_sha1_from_local_anchors_as_neutral)
|
| - ? NONE
|
| - : DANGEROUS;
|
| - }
|
| + // DANGEROUS will have been returned above. If SHA1 was permitted by policy,
|
| + // downgrade the security level to Neutral.
|
| + if (sha1_status == DEPRECATED_SHA1)
|
| + return NONE;
|
|
|
| // Active mixed content is handled above.
|
| DCHECK_NE(CONTENT_STATUS_RAN, mixed_content_status);
|
| @@ -307,8 +292,7 @@ VisibleSecurityState::VisibleSecurityState()
|
| ran_content_with_cert_errors(false),
|
| pkp_bypassed(false),
|
| displayed_password_field_on_http(false),
|
| - displayed_credit_card_field_on_http(false),
|
| - display_sha1_from_local_anchors_as_neutral(false) {}
|
| + displayed_credit_card_field_on_http(false) {}
|
|
|
| VisibleSecurityState::~VisibleSecurityState() {}
|
|
|
| @@ -330,9 +314,7 @@ bool VisibleSecurityState::operator==(const VisibleSecurityState& other) const {
|
| displayed_password_field_on_http ==
|
| other.displayed_password_field_on_http &&
|
| displayed_credit_card_field_on_http ==
|
| - other.displayed_credit_card_field_on_http &&
|
| - display_sha1_from_local_anchors_as_neutral ==
|
| - other.display_sha1_from_local_anchors_as_neutral);
|
| + other.displayed_credit_card_field_on_http);
|
| }
|
|
|
| } // namespace security_state
|
|
|