Skip to content

Commit

Permalink
Remove intranet hostname check from ssl_policy now that CertVerifier …
Browse files Browse the repository at this point in the history
…handles it

http://crrev.com/200704 implemented a better handle for intranet
hostnames, by only warning when it changes to a well-known/"public" CA.

Remove the existing logic, which only handled dotless domains, which
are presumably less common than their non-gTLD equivalents (eg:
example.corp > example)

BUG=119212

Review URL: https://chromiumcodereview.appspot.com/20014003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213563 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rsleevi@chromium.org committed Jul 25, 2013
1 parent d8cef85 commit 9747a17
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions content/browser/ssl/ssl_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
#include "webkit/common/resource_type.h"


namespace {

const char kDot = '.';

bool IsIntranetHost(const std::string& host) {
const size_t dot = host.find(kDot);
return dot == std::string::npos || dot == host.length() - 1;
}

} // namespace

namespace content {

SSLPolicy::SSLPolicy(SSLPolicyBackend* backend)
Expand Down Expand Up @@ -124,14 +113,6 @@ void SSLPolicy::UpdateEntry(NavigationEntryImpl* entry,
return;
}

if (!(entry->GetSSL().cert_status & net::CERT_STATUS_COMMON_NAME_INVALID)) {
// CAs issue certificates for intranet hosts to everyone. Therefore, we
// mark intranet hosts as being non-unique.
if (IsIntranetHost(entry->GetURL().host())) {
entry->GetSSL().cert_status |= net::CERT_STATUS_NON_UNIQUE_NAME;
}
}

if (net::IsCertStatusError(entry->GetSSL().cert_status)) {
// Minor errors don't lower the security style to
// SECURITY_STYLE_AUTHENTICATION_BROKEN.
Expand Down

0 comments on commit 9747a17

Please sign in to comment.