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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // For all other hosts, which must be DENIED, a blocking page is shown to the | 49 // For all other hosts, which must be DENIED, a blocking page is shown to the |
50 // user every time they come back to the page. | 50 // user every time they come back to the page. |
51 int options_mask = 0; | 51 int options_mask = 0; |
52 switch (handler->cert_error()) { | 52 switch (handler->cert_error()) { |
53 case net::ERR_CERT_COMMON_NAME_INVALID: | 53 case net::ERR_CERT_COMMON_NAME_INVALID: |
54 case net::ERR_CERT_DATE_INVALID: | 54 case net::ERR_CERT_DATE_INVALID: |
55 case net::ERR_CERT_AUTHORITY_INVALID: | 55 case net::ERR_CERT_AUTHORITY_INVALID: |
56 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: | 56 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: |
57 case net::ERR_CERT_WEAK_KEY: | 57 case net::ERR_CERT_WEAK_KEY: |
58 case net::ERR_CERT_NAME_CONSTRAINT_VIOLATION: | 58 case net::ERR_CERT_NAME_CONSTRAINT_VIOLATION: |
| 59 case net::ERR_CERT_VALIDITY_TOO_LONG: |
59 if (!handler->fatal()) | 60 if (!handler->fatal()) |
60 options_mask |= OVERRIDABLE; | 61 options_mask |= OVERRIDABLE; |
61 else | 62 else |
62 options_mask |= STRICT_ENFORCEMENT; | 63 options_mask |= STRICT_ENFORCEMENT; |
63 if (expired_previous_decision) | 64 if (expired_previous_decision) |
64 options_mask |= EXPIRED_PREVIOUS_DECISION; | 65 options_mask |= EXPIRED_PREVIOUS_DECISION; |
65 OnCertErrorInternal(handler, options_mask); | 66 OnCertErrorInternal(handler, options_mask); |
66 break; | 67 break; |
67 case net::ERR_CERT_NO_REVOCATION_MECHANISM: | 68 case net::ERR_CERT_NO_REVOCATION_MECHANISM: |
68 // Ignore this error. | 69 // Ignore this error. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; | 232 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; |
232 } | 233 } |
233 | 234 |
234 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 235 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
235 GURL parsed_origin(origin); | 236 GURL parsed_origin(origin); |
236 if (parsed_origin.SchemeIsSecure()) | 237 if (parsed_origin.SchemeIsSecure()) |
237 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 238 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
238 } | 239 } |
239 | 240 |
240 } // namespace content | 241 } // namespace content |
OLD | NEW |