| 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 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
| 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "net/cert/cert_status_flags.h" | 9 #include "net/cert/cert_status_flags.h" |
| 10 #include "net/cert/sct_status_flags.h" | 10 #include "net/cert/sct_status_flags.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // The connection used a certificate with a SHA1 signature in the | 65 // The connection used a certificate with a SHA1 signature in the |
| 66 // chain, and policy says that the connection should be treated with a | 66 // chain, and policy says that the connection should be treated with a |
| 67 // warning. | 67 // warning. |
| 68 DEPRECATED_SHA1_MINOR, | 68 DEPRECATED_SHA1_MINOR, |
| 69 // The connection used a certificate with a SHA1 signature in the | 69 // The connection used a certificate with a SHA1 signature in the |
| 70 // chain, and policy says that the connection should be treated as | 70 // chain, and policy says that the connection should be treated as |
| 71 // broken HTTPS. | 71 // broken HTTPS. |
| 72 DEPRECATED_SHA1_MAJOR, | 72 DEPRECATED_SHA1_MAJOR, |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 // Describes the type of mixed content (if any) that a site | 75 // The ContentStatus enum is used to describe content on the page that |
| 76 // displayed/ran. | 76 // has significantly different security properties than the main page |
| 77 enum MixedContentStatus { | 77 // load. Content can be passive content that is displayed (such as |
| 78 UNKNOWN_MIXED_CONTENT, | 78 // images) or active content that is run (such as scripts or iframes). |
| 79 NO_MIXED_CONTENT, | 79 enum ContentStatus { |
| 80 // The site displayed insecure resources (passive mixed content). | 80 CONTENT_STATUS_UNKNOWN, |
| 81 DISPLAYED_MIXED_CONTENT, | 81 CONTENT_STATUS_NONE, |
| 82 // The site ran insecure code (active mixed content). | 82 CONTENT_STATUS_DISPLAYED, |
| 83 RAN_MIXED_CONTENT, | 83 CONTENT_STATUS_RAN, |
| 84 // The site both ran and displayed insecure resources. | 84 CONTENT_STATUS_DISPLAYED_AND_RAN, |
| 85 RAN_AND_DISPLAYED_MIXED_CONTENT, | |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 // Describes the security status of a page or request. This is the | 87 // Describes the security status of a page or request. This is the |
| 89 // main data structure provided by this class. | 88 // main data structure provided by this class. |
| 90 struct SecurityInfo { | 89 struct SecurityInfo { |
| 91 SecurityInfo(); | 90 SecurityInfo(); |
| 92 ~SecurityInfo(); | 91 ~SecurityInfo(); |
| 93 SecurityLevel security_level; | 92 SecurityLevel security_level; |
| 94 // True if the page fails the browser's malware or phishing checks. | 93 // True if the page fails the browser's malware or phishing checks. |
| 95 bool fails_malware_check; | 94 bool fails_malware_check; |
| 96 SHA1DeprecationStatus sha1_deprecation_status; | 95 SHA1DeprecationStatus sha1_deprecation_status; |
| 97 MixedContentStatus mixed_content_status; | 96 // |mixed_content_status| describes the presence of content that was |
| 97 // loaded over a nonsecure (HTTP) connection. |
| 98 ContentStatus mixed_content_status; |
| 98 // The verification statuses of the signed certificate timestamps | 99 // The verification statuses of the signed certificate timestamps |
| 99 // for the connection. | 100 // for the connection. |
| 100 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; | 101 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; |
| 101 bool scheme_is_cryptographic; | 102 bool scheme_is_cryptographic; |
| 102 net::CertStatus cert_status; | 103 net::CertStatus cert_status; |
| 103 int cert_id; | 104 int cert_id; |
| 104 // The security strength, in bits, of the SSL cipher suite. In late | 105 // The security strength, in bits, of the SSL cipher suite. In late |
| 105 // 2015, 128 is considered the minimum. | 106 // 2015, 128 is considered the minimum. |
| 106 // 0 means the connection is not encrypted. | 107 // 0 means the connection is not encrypted. |
| 107 // -1 means the security strength is unknown. | 108 // -1 means the security strength is unknown. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 mutable VisibleSecurityState visible_security_state_; | 175 mutable VisibleSecurityState visible_security_state_; |
| 175 | 176 |
| 176 SecurityStateModelClient* client_; | 177 SecurityStateModelClient* client_; |
| 177 | 178 |
| 178 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); | 179 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); |
| 179 }; | 180 }; |
| 180 | 181 |
| 181 } // namespace security_state | 182 } // namespace security_state |
| 182 | 183 |
| 183 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 184 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
| OLD | NEW |