OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 // The judgment is either DENIED or UNKNOWN. | 57 // The judgment is either DENIED or UNKNOWN. |
58 // For now we handle the DENIED as the UNKNOWN, which means a blocking | 58 // For now we handle the DENIED as the UNKNOWN, which means a blocking |
59 // page is shown to the user every time he comes back to the page. | 59 // page is shown to the user every time he comes back to the page. |
60 | 60 |
61 switch (handler->cert_error()) { | 61 switch (handler->cert_error()) { |
62 case net::ERR_CERT_COMMON_NAME_INVALID: | 62 case net::ERR_CERT_COMMON_NAME_INVALID: |
63 case net::ERR_CERT_DATE_INVALID: | 63 case net::ERR_CERT_DATE_INVALID: |
64 case net::ERR_CERT_AUTHORITY_INVALID: | 64 case net::ERR_CERT_AUTHORITY_INVALID: |
65 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: | 65 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: |
66 OnCertErrorInternal(handler, !handler->is_hsts_host()); | 66 OnCertErrorInternal(handler, !handler->fatal()); |
67 break; | 67 break; |
68 case net::ERR_CERT_NO_REVOCATION_MECHANISM: | 68 case net::ERR_CERT_NO_REVOCATION_MECHANISM: |
69 // Ignore this error. | 69 // Ignore this error. |
70 handler->ContinueRequest(); | 70 handler->ContinueRequest(); |
71 break; | 71 break; |
72 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: | 72 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: |
73 // We ignore this error but will show a warning status in the location | 73 // We ignore this error but will show a warning status in the location |
74 // bar. | 74 // bar. |
75 handler->ContinueRequest(); | 75 handler->ContinueRequest(); |
76 break; | 76 break; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ? | 215 entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ? |
216 content::SECURITY_STYLE_AUTHENTICATED : | 216 content::SECURITY_STYLE_AUTHENTICATED : |
217 content::SECURITY_STYLE_UNAUTHENTICATED; | 217 content::SECURITY_STYLE_UNAUTHENTICATED; |
218 } | 218 } |
219 | 219 |
220 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 220 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
221 GURL parsed_origin(origin); | 221 GURL parsed_origin(origin); |
222 if (parsed_origin.SchemeIsSecure()) | 222 if (parsed_origin.SchemeIsSecure()) |
223 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 223 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
224 } | 224 } |
OLD | NEW |