OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/ssl/ssl_policy.h" | 5 #include "chrome/browser/ssl/ssl_policy.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 if (judgment == net::X509Certificate::Policy::ALLOWED) { | 78 if (judgment == net::X509Certificate::Policy::ALLOWED) { |
79 handler->ContinueRequest(); | 79 handler->ContinueRequest(); |
80 return; | 80 return; |
81 } | 81 } |
82 | 82 |
83 // The judgment is either DENIED or UNKNOWN. | 83 // The judgment is either DENIED or UNKNOWN. |
84 // For now we handle the DENIED as the UNKNOWN, which means a blocking | 84 // For now we handle the DENIED as the UNKNOWN, which means a blocking |
85 // page is shown to the user every time he comes back to the page. | 85 // page is shown to the user every time he comes back to the page. |
86 | 86 |
87 switch(handler->cert_error()) { | 87 switch (handler->cert_error()) { |
88 case net::ERR_CERT_COMMON_NAME_INVALID: | 88 case net::ERR_CERT_COMMON_NAME_INVALID: |
89 case net::ERR_CERT_DATE_INVALID: | 89 case net::ERR_CERT_DATE_INVALID: |
90 case net::ERR_CERT_AUTHORITY_INVALID: | 90 case net::ERR_CERT_AUTHORITY_INVALID: |
| 91 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: |
91 OnOverridableCertError(handler); | 92 OnOverridableCertError(handler); |
92 break; | 93 break; |
93 case net::ERR_CERT_NO_REVOCATION_MECHANISM: | 94 case net::ERR_CERT_NO_REVOCATION_MECHANISM: |
94 // Ignore this error. | 95 // Ignore this error. |
95 handler->ContinueRequest(); | 96 handler->ContinueRequest(); |
96 break; | 97 break; |
97 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: | 98 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: |
98 // We ignore this error and display an infobar. | 99 // We ignore this error and display an infobar. |
99 handler->ContinueRequest(); | 100 handler->ContinueRequest(); |
100 backend_->ShowMessage(l10n_util::GetString( | 101 backend_->ShowMessage(l10n_util::GetString( |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 // mark the main frame's origin as broken too. | 358 // mark the main frame's origin as broken too. |
358 MarkOriginAsBroken(info->main_frame_origin(), info->pid()); | 359 MarkOriginAsBroken(info->main_frame_origin(), info->pid()); |
359 } | 360 } |
360 } | 361 } |
361 | 362 |
362 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) { | 363 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) { |
363 // This request as a broken cert, which means its host is broken. | 364 // This request as a broken cert, which means its host is broken. |
364 backend_->MarkHostAsBroken(info->url().host(), info->pid()); | 365 backend_->MarkHostAsBroken(info->url().host(), info->pid()); |
365 UpdateStateForMixedContent(info); | 366 UpdateStateForMixedContent(info); |
366 } | 367 } |
OLD | NEW |