OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/ssl/ssl_policy.h" | 5 #include "content/browser/ssl/ssl_policy.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // The judgment is either DENIED or UNKNOWN. | 44 // The judgment is either DENIED or UNKNOWN. |
45 // For now we handle the DENIED as the UNKNOWN, which means a blocking | 45 // For now we handle the DENIED as the UNKNOWN, which means a blocking |
46 // page is shown to the user every time he comes back to the page. | 46 // page is shown to the user every time he comes back to the page. |
47 | 47 |
48 switch (handler->cert_error()) { | 48 switch (handler->cert_error()) { |
49 case net::ERR_CERT_COMMON_NAME_INVALID: | 49 case net::ERR_CERT_COMMON_NAME_INVALID: |
50 case net::ERR_CERT_DATE_INVALID: | 50 case net::ERR_CERT_DATE_INVALID: |
51 case net::ERR_CERT_AUTHORITY_INVALID: | 51 case net::ERR_CERT_AUTHORITY_INVALID: |
52 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: | 52 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: |
53 case net::ERR_CERT_WEAK_KEY: | 53 case net::ERR_CERT_WEAK_KEY: |
| 54 case net::ERR_CERT_TOO_LONG_VALIDITY: |
54 OnCertErrorInternal(handler, !handler->fatal(), handler->fatal()); | 55 OnCertErrorInternal(handler, !handler->fatal(), handler->fatal()); |
55 break; | 56 break; |
56 case net::ERR_CERT_NO_REVOCATION_MECHANISM: | 57 case net::ERR_CERT_NO_REVOCATION_MECHANISM: |
57 // Ignore this error. | 58 // Ignore this error. |
58 handler->ContinueRequest(); | 59 handler->ContinueRequest(); |
59 break; | 60 break; |
60 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: | 61 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: |
61 // We ignore this error but will show a warning status in the location | 62 // We ignore this error but will show a warning status in the location |
62 // bar. | 63 // bar. |
63 handler->ContinueRequest(); | 64 handler->ContinueRequest(); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; | 213 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; |
213 } | 214 } |
214 | 215 |
215 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 216 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
216 GURL parsed_origin(origin); | 217 GURL parsed_origin(origin); |
217 if (parsed_origin.SchemeIsSecure()) | 218 if (parsed_origin.SchemeIsSecure()) |
218 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 219 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
219 } | 220 } |
220 | 221 |
221 } // namespace content | 222 } // namespace content |
OLD | NEW |