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

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

Issue 7976036: net: make HSTS hosts use the normal SSL interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 3 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
OLDNEW
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/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // The judgment is either DENIED or UNKNOWN. 52 // The judgment is either DENIED or UNKNOWN.
53 // For now we handle the DENIED as the UNKNOWN, which means a blocking 53 // For now we handle the DENIED as the UNKNOWN, which means a blocking
54 // page is shown to the user every time he comes back to the page. 54 // page is shown to the user every time he comes back to the page.
55 55
56 switch (handler->cert_error()) { 56 switch (handler->cert_error()) {
57 case net::ERR_CERT_COMMON_NAME_INVALID: 57 case net::ERR_CERT_COMMON_NAME_INVALID:
58 case net::ERR_CERT_DATE_INVALID: 58 case net::ERR_CERT_DATE_INVALID:
59 case net::ERR_CERT_AUTHORITY_INVALID: 59 case net::ERR_CERT_AUTHORITY_INVALID:
60 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: 60 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM:
61 OnCertErrorInternal(handler, true); 61 OnCertErrorInternal(handler, !handler->is_hsts_host());
62 break; 62 break;
63 case net::ERR_CERT_NO_REVOCATION_MECHANISM: 63 case net::ERR_CERT_NO_REVOCATION_MECHANISM:
64 // Ignore this error. 64 // Ignore this error.
65 handler->ContinueRequest(); 65 handler->ContinueRequest();
66 break; 66 break;
67 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: 67 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION:
68 // We ignore this error but will show a warning status in the location 68 // We ignore this error but will show a warning status in the location
69 // bar. 69 // bar.
70 handler->ContinueRequest(); 70 handler->ContinueRequest();
71 break; 71 break;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 entry->ssl().set_security_style(entry->url().SchemeIsSecure() ? 208 entry->ssl().set_security_style(entry->url().SchemeIsSecure() ?
209 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED); 209 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED);
210 } 210 }
211 211
212 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { 212 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
213 GURL parsed_origin(origin); 213 GURL parsed_origin(origin);
214 if (parsed_origin.SchemeIsSecure()) 214 if (parsed_origin.SchemeIsSecure())
215 backend_->HostRanInsecureContent(parsed_origin.host(), pid); 215 backend_->HostRanInsecureContent(parsed_origin.host(), pid);
216 } 216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698