Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: chrome/browser/ssl/ssl_policy.cc

Issue 165504: Add new certificate error code... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ssl/ssl_error_info.cc ('k') | chrome/common/security_filter_peer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_error_info.cc ('k') | chrome/common/security_filter_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698