| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 if (security_info.sha1_in_chain) { | 222 if (security_info.sha1_in_chain) { |
| 223 security_style_explanations->unauthenticated_explanations.push_back( | 223 security_style_explanations->unauthenticated_explanations.push_back( |
| 224 content::SecurityStyleExplanation( | 224 content::SecurityStyleExplanation( |
| 225 l10n_util::GetStringUTF8(IDS_SHA1), | 225 l10n_util::GetStringUTF8(IDS_SHA1), |
| 226 l10n_util::GetStringUTF8(IDS_SHA1_DESCRIPTION), | 226 l10n_util::GetStringUTF8(IDS_SHA1_DESCRIPTION), |
| 227 !!security_info.certificate)); | 227 !!security_info.certificate)); |
| 228 } | 228 } |
| 229 | 229 |
| 230 if (security_info.cert_missing_subject_alt_name) { |
| 231 security_style_explanations->broken_explanations.push_back( |
| 232 content::SecurityStyleExplanation( |
| 233 l10n_util::GetStringUTF8(IDS_SUBJECT_ALT_NAME_MISSING), |
| 234 l10n_util::GetStringUTF8(IDS_SUBJECT_ALT_NAME_MISSING_DESCRIPTION), |
| 235 !!security_info.certificate)); |
| 236 } |
| 237 |
| 230 // Record the presence of mixed content (HTTP subresources on an HTTPS | 238 // Record the presence of mixed content (HTTP subresources on an HTTPS |
| 231 // page). | 239 // page). |
| 232 security_style_explanations->ran_mixed_content = | 240 security_style_explanations->ran_mixed_content = |
| 233 security_info.mixed_content_status == | 241 security_info.mixed_content_status == |
| 234 security_state::CONTENT_STATUS_RAN || | 242 security_state::CONTENT_STATUS_RAN || |
| 235 security_info.mixed_content_status == | 243 security_info.mixed_content_status == |
| 236 security_state::CONTENT_STATUS_DISPLAYED_AND_RAN; | 244 security_state::CONTENT_STATUS_DISPLAYED_AND_RAN; |
| 237 security_style_explanations->displayed_mixed_content = | 245 security_style_explanations->displayed_mixed_content = |
| 238 security_info.mixed_content_status == | 246 security_info.mixed_content_status == |
| 239 security_state::CONTENT_STATUS_DISPLAYED || | 247 security_state::CONTENT_STATUS_DISPLAYED || |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 security_style_explanations->info_explanations.push_back( | 307 security_style_explanations->info_explanations.push_back( |
| 300 content::SecurityStyleExplanation( | 308 content::SecurityStyleExplanation( |
| 301 "Public-Key Pinning Bypassed", | 309 "Public-Key Pinning Bypassed", |
| 302 "Public-key pinning was bypassed by a local root certificate.")); | 310 "Public-key pinning was bypassed by a local root certificate.")); |
| 303 } | 311 } |
| 304 | 312 |
| 305 return security_style; | 313 return security_style; |
| 306 } | 314 } |
| 307 | 315 |
| 308 } // namespace security_state | 316 } // namespace security_state |
| OLD | NEW |