OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 const net::X509Certificate& cert); | 33 const net::X509Certificate& cert); |
34 virtual ~SSLErrorClassification(); | 34 virtual ~SSLErrorClassification(); |
35 | 35 |
36 // Returns true if the system time is in the past. | 36 // Returns true if the system time is in the past. |
37 static bool IsUserClockInThePast(const base::Time& time_now); | 37 static bool IsUserClockInThePast(const base::Time& time_now); |
38 | 38 |
39 // Returns true if the system time is too far in the future or the user is | 39 // Returns true if the system time is too far in the future or the user is |
40 // using a version of Chrome which is more than 1 year old. | 40 // using a version of Chrome which is more than 1 year old. |
41 static bool IsUserClockInTheFuture(const base::Time& time_now); | 41 static bool IsUserClockInTheFuture(const base::Time& time_now); |
42 | 42 |
43 static bool IsWindowsVersionSP3OrLower(); | 43 // Returns true if the Windows platform is likely to not have SHA-256 support. |
| 44 // On other platforms, returns false always. |
| 45 static bool MaybeWindowsLacksSHA256Support(); |
44 | 46 |
45 // A function which calculates the severity score when the ssl error is | 47 // A function which calculates the severity score when the ssl error is |
46 // |CERT_DATE_INVALID|. The calculated score is between 0.0 and 1.0, higher | 48 // |CERT_DATE_INVALID|. The calculated score is between 0.0 and 1.0, higher |
47 // being more severe, indicating how severe the certificate's | 49 // being more severe, indicating how severe the certificate's |
48 // date invalid error is. | 50 // date invalid error is. |
49 void InvalidDateSeverityScore(); | 51 void InvalidDateSeverityScore(); |
50 | 52 |
51 // A function which calculates the severity score when the ssl error is | 53 // A function which calculates the severity score when the ssl error is |
52 // |CERT_COMMON_NAME_INVALID|. The calculated score is between 0.0 and 1.0, | 54 // |CERT_COMMON_NAME_INVALID|. The calculated score is between 0.0 and 1.0, |
53 // higher being more severe, indicating how severe the certificate's common | 55 // higher being more severe, indicating how severe the certificate's common |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 bool captive_portal_probe_completed_; | 144 bool captive_portal_probe_completed_; |
143 // Did the captive portal probe receive an error or get a non-HTTP response? | 145 // Did the captive portal probe receive an error or get a non-HTTP response? |
144 bool captive_portal_no_response_; | 146 bool captive_portal_no_response_; |
145 // Was a captive portal detected? | 147 // Was a captive portal detected? |
146 bool captive_portal_detected_; | 148 bool captive_portal_detected_; |
147 | 149 |
148 content::NotificationRegistrar registrar_; | 150 content::NotificationRegistrar registrar_; |
149 }; | 151 }; |
150 | 152 |
151 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 153 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
OLD | NEW |