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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 // The connection used a certificate with a SHA1 signature in the | 63 // The connection used a certificate with a SHA1 signature in the |
64 // chain, and policy says that the connection should be treated with a | 64 // chain, and policy says that the connection should be treated with a |
65 // warning. | 65 // warning. |
66 DEPRECATED_SHA1_MINOR, | 66 DEPRECATED_SHA1_MINOR, |
67 // The connection used a certificate with a SHA1 signature in the | 67 // The connection used a certificate with a SHA1 signature in the |
68 // chain, and policy says that the connection should be treated as | 68 // chain, and policy says that the connection should be treated as |
69 // broken HTTPS. | 69 // broken HTTPS. |
70 DEPRECATED_SHA1_MAJOR, | 70 DEPRECATED_SHA1_MAJOR, |
71 }; | 71 }; |
72 | 72 |
73 // Describes the type of mixed content (if any) that a site | 73 // The ContentStatus enum is used to describe content on the page that |
74 // displayed/ran. | 74 // has significantly different security properties than the main page |
75 enum MixedContentStatus { | 75 // load. Content can be passive content that is displayed (such as |
76 NO_MIXED_CONTENT, | 76 // images) or active content that is run (such as scripts or iframes). |
77 // The site displayed insecure resources (passive mixed content). | 77 enum ContentStatus { |
78 DISPLAYED_MIXED_CONTENT, | 78 CONTENT_STATUS_NONE, |
79 // The site ran insecure code (active mixed content). | 79 CONTENT_STATUS_DISPLAYED, |
80 RAN_MIXED_CONTENT, | 80 CONTENT_STATUS_RAN, |
81 // The site both ran and displayed insecure resources. | 81 CONTENT_STATUS_DISPLAYED_AND_RAN, |
82 RAN_AND_DISPLAYED_MIXED_CONTENT, | |
83 }; | 82 }; |
84 | 83 |
85 // Describes the security status of a page or request. This is the | 84 // Describes the security status of a page or request. This is the |
86 // main data structure provided by this class. | 85 // main data structure provided by this class. |
87 struct SecurityInfo { | 86 struct SecurityInfo { |
88 SecurityInfo(); | 87 SecurityInfo(); |
89 ~SecurityInfo(); | 88 ~SecurityInfo(); |
90 SecurityLevel security_level; | 89 SecurityLevel security_level; |
91 SHA1DeprecationStatus sha1_deprecation_status; | 90 SHA1DeprecationStatus sha1_deprecation_status; |
92 MixedContentStatus mixed_content_status; | 91 // |mixed_content_status| describes the presence of content that was |
92 // loaded over a nonsecure (HTTP) connection. | |
93 ContentStatus mixed_content_status; | |
felt
2016/08/11 19:30:26
nit: weird to leave it named mixed_content_status
| |
93 // The verification statuses of the signed certificate timestamps | 94 // The verification statuses of the signed certificate timestamps |
94 // for the connection. | 95 // for the connection. |
95 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; | 96 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; |
96 bool scheme_is_cryptographic; | 97 bool scheme_is_cryptographic; |
97 net::CertStatus cert_status; | 98 net::CertStatus cert_status; |
98 int cert_id; | 99 int cert_id; |
99 // The security strength, in bits, of the SSL cipher suite. In late | 100 // The security strength, in bits, of the SSL cipher suite. In late |
100 // 2015, 128 is considered the minimum. | 101 // 2015, 128 is considered the minimum. |
101 // 0 means the connection is not encrypted. | 102 // 0 means the connection is not encrypted. |
102 // -1 means the security strength is unknown. | 103 // -1 means the security strength is unknown. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 mutable VisibleSecurityState visible_security_state_; | 166 mutable VisibleSecurityState visible_security_state_; |
166 | 167 |
167 SecurityStateModelClient* client_; | 168 SecurityStateModelClient* client_; |
168 | 169 |
169 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); | 170 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); |
170 }; | 171 }; |
171 | 172 |
172 } // namespace security_state | 173 } // namespace security_state |
173 | 174 |
174 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 175 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
OLD | NEW |