| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/security_state/content/content_utils.h" | 5 #include "components/security_state/content/content_utils.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 if (security_info.sha1_in_chain) { | 221 if (security_info.sha1_in_chain) { |
| 222 security_style_explanations->unauthenticated_explanations.push_back( | 222 security_style_explanations->unauthenticated_explanations.push_back( |
| 223 content::SecurityStyleExplanation( | 223 content::SecurityStyleExplanation( |
| 224 l10n_util::GetStringUTF8(IDS_SHA1), | 224 l10n_util::GetStringUTF8(IDS_SHA1), |
| 225 l10n_util::GetStringUTF8(IDS_SHA1_DESCRIPTION), | 225 l10n_util::GetStringUTF8(IDS_SHA1_DESCRIPTION), |
| 226 !!security_info.certificate)); | 226 !!security_info.certificate)); |
| 227 } | 227 } |
| 228 | 228 |
| 229 if (security_info.cert_missing_subject_alt_name) { |
| 230 security_style_explanations->broken_explanations.push_back( |
| 231 content::SecurityStyleExplanation( |
| 232 l10n_util::GetStringUTF8(IDS_SUBJECT_ALT_NAME_MISSING), |
| 233 l10n_util::GetStringUTF8(IDS_SUBJECT_ALT_NAME_MISSING_DESCRIPTION), |
| 234 !!security_info.certificate)); |
| 235 } |
| 236 |
| 229 // Record the presence of mixed content (HTTP subresources on an HTTPS | 237 // Record the presence of mixed content (HTTP subresources on an HTTPS |
| 230 // page). | 238 // page). |
| 231 security_style_explanations->ran_mixed_content = | 239 security_style_explanations->ran_mixed_content = |
| 232 security_info.mixed_content_status == | 240 security_info.mixed_content_status == |
| 233 security_state::CONTENT_STATUS_RAN || | 241 security_state::CONTENT_STATUS_RAN || |
| 234 security_info.mixed_content_status == | 242 security_info.mixed_content_status == |
| 235 security_state::CONTENT_STATUS_DISPLAYED_AND_RAN; | 243 security_state::CONTENT_STATUS_DISPLAYED_AND_RAN; |
| 236 security_style_explanations->displayed_mixed_content = | 244 security_style_explanations->displayed_mixed_content = |
| 237 security_info.mixed_content_status == | 245 security_info.mixed_content_status == |
| 238 security_state::CONTENT_STATUS_DISPLAYED || | 246 security_state::CONTENT_STATUS_DISPLAYED || |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 security_style_explanations->info_explanations.push_back( | 306 security_style_explanations->info_explanations.push_back( |
| 299 content::SecurityStyleExplanation( | 307 content::SecurityStyleExplanation( |
| 300 "Public-Key Pinning Bypassed", | 308 "Public-Key Pinning Bypassed", |
| 301 "Public-key pinning was bypassed by a local root certificate.")); | 309 "Public-key pinning was bypassed by a local root certificate.")); |
| 302 } | 310 } |
| 303 | 311 |
| 304 return security_style; | 312 return security_style; |
| 305 } | 313 } |
| 306 | 314 |
| 307 } // namespace security_state | 315 } // namespace security_state |
| OLD | NEW |