OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/security_state_model.h" | 5 #include "components/security_state/security_state_model.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 GetContentStatus(visible_security_state.displayed_mixed_content, | 202 GetContentStatus(visible_security_state.displayed_mixed_content, |
203 visible_security_state.ran_mixed_content); | 203 visible_security_state.ran_mixed_content); |
204 security_info->content_with_cert_errors_status = GetContentStatus( | 204 security_info->content_with_cert_errors_status = GetContentStatus( |
205 visible_security_state.displayed_content_with_cert_errors, | 205 visible_security_state.displayed_content_with_cert_errors, |
206 visible_security_state.ran_content_with_cert_errors); | 206 visible_security_state.ran_content_with_cert_errors); |
207 security_info->security_bits = visible_security_state.security_bits; | 207 security_info->security_bits = visible_security_state.security_bits; |
208 security_info->connection_status = visible_security_state.connection_status; | 208 security_info->connection_status = visible_security_state.connection_status; |
209 security_info->cert_status = visible_security_state.cert_status; | 209 security_info->cert_status = visible_security_state.cert_status; |
210 security_info->scheme_is_cryptographic = | 210 security_info->scheme_is_cryptographic = |
211 visible_security_state.url.SchemeIsCryptographic(); | 211 visible_security_state.url.SchemeIsCryptographic(); |
| 212 security_info->obsolete_ssl_status = |
| 213 net::ObsoleteSSLStatus(security_info->connection_status); |
212 security_info->pkp_bypassed = visible_security_state.pkp_bypassed; | 214 security_info->pkp_bypassed = visible_security_state.pkp_bypassed; |
213 security_info->is_secure_protocol_and_ciphersuite = | |
214 (net::SSLConnectionStatusToVersion(security_info->connection_status) >= | |
215 net::SSL_CONNECTION_VERSION_TLS1_2 && | |
216 net::IsSecureTLSCipherSuite(net::SSLConnectionStatusToCipherSuite( | |
217 security_info->connection_status))); | |
218 | |
219 security_info->sct_verify_statuses = | 215 security_info->sct_verify_statuses = |
220 visible_security_state.sct_verify_statuses; | 216 visible_security_state.sct_verify_statuses; |
221 | 217 |
222 security_info->fails_malware_check = | 218 security_info->fails_malware_check = |
223 visible_security_state.fails_malware_check; | 219 visible_security_state.fails_malware_check; |
224 | 220 |
225 security_info->security_level = GetSecurityLevelForRequest( | 221 security_info->security_level = GetSecurityLevelForRequest( |
226 visible_security_state, client, cert, | 222 visible_security_state, client, cert, |
227 security_info->sha1_deprecation_status, | 223 security_info->sha1_deprecation_status, |
228 security_info->mixed_content_status, | 224 security_info->mixed_content_status, |
(...skipping 13 matching lines...) Expand all Loading... |
242 : security_level(SecurityStateModel::NONE), | 238 : security_level(SecurityStateModel::NONE), |
243 fails_malware_check(false), | 239 fails_malware_check(false), |
244 sha1_deprecation_status(SecurityStateModel::NO_DEPRECATED_SHA1), | 240 sha1_deprecation_status(SecurityStateModel::NO_DEPRECATED_SHA1), |
245 mixed_content_status(SecurityStateModel::CONTENT_STATUS_NONE), | 241 mixed_content_status(SecurityStateModel::CONTENT_STATUS_NONE), |
246 content_with_cert_errors_status(SecurityStateModel::CONTENT_STATUS_NONE), | 242 content_with_cert_errors_status(SecurityStateModel::CONTENT_STATUS_NONE), |
247 scheme_is_cryptographic(false), | 243 scheme_is_cryptographic(false), |
248 cert_status(0), | 244 cert_status(0), |
249 cert_id(0), | 245 cert_id(0), |
250 security_bits(-1), | 246 security_bits(-1), |
251 connection_status(0), | 247 connection_status(0), |
252 is_secure_protocol_and_ciphersuite(false), | 248 obsolete_ssl_status(net::OBSOLETE_SSL_NONE), |
253 pkp_bypassed(false) {} | 249 pkp_bypassed(false) {} |
254 | 250 |
255 SecurityStateModel::SecurityInfo::~SecurityInfo() {} | 251 SecurityStateModel::SecurityInfo::~SecurityInfo() {} |
256 | 252 |
257 SecurityStateModel::SecurityStateModel() {} | 253 SecurityStateModel::SecurityStateModel() {} |
258 | 254 |
259 SecurityStateModel::~SecurityStateModel() {} | 255 SecurityStateModel::~SecurityStateModel() {} |
260 | 256 |
261 const SecurityStateModel::SecurityInfo& SecurityStateModel::GetSecurityInfo() | 257 const SecurityStateModel::SecurityInfo& SecurityStateModel::GetSecurityInfo() |
262 const { | 258 const { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 sct_verify_statuses == other.sct_verify_statuses && | 311 sct_verify_statuses == other.sct_verify_statuses && |
316 displayed_mixed_content == other.displayed_mixed_content && | 312 displayed_mixed_content == other.displayed_mixed_content && |
317 ran_mixed_content == other.ran_mixed_content && | 313 ran_mixed_content == other.ran_mixed_content && |
318 displayed_content_with_cert_errors == | 314 displayed_content_with_cert_errors == |
319 other.displayed_content_with_cert_errors && | 315 other.displayed_content_with_cert_errors && |
320 ran_content_with_cert_errors == other.ran_content_with_cert_errors && | 316 ran_content_with_cert_errors == other.ran_content_with_cert_errors && |
321 pkp_bypassed == other.pkp_bypassed); | 317 pkp_bypassed == other.pkp_bypassed); |
322 } | 318 } |
323 | 319 |
324 } // namespace security_state | 320 } // namespace security_state |
OLD | NEW |