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

Unified Diff: net/base/x509_openssl_util.cc

Issue 5195001: Fixes the remaining net_unittests for OpenSSL, with the exceptions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable browser unittests Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: net/base/x509_openssl_util.cc
diff --git a/net/base/x509_openssl_util.cc b/net/base/x509_openssl_util.cc
index 9e44c4b8d5750e7b6a856f0e55f245affb8282a5..bdd031cb561609403c39b146cfd8014c39d2d301 100644
--- a/net/base/x509_openssl_util.cc
+++ b/net/base/x509_openssl_util.cc
@@ -149,8 +149,15 @@ bool VerifyHostname(const std::string& hostname,
}
DCHECK(!reference_name.empty());
- // TODO(joth): Add IP address support. See http://crbug.com/62973
+ // TODO(joth): Add full IP address support. See http://crbug.com/62973
if (found_ip6_chars || !found_alpha) {
+ // Special case localhost connection, to support test server based tests.
+ if (hostname == "127.0.0.1" &&
+ std::find(cert_names.begin(), cert_names.end(), hostname)
+ != cert_names.end()) {
+ DVLOG(1) << "Allowing localhost IP certificate: " << hostname;
bulach 2010/12/01 18:01:33 similar to my comments at http://codereview.chromi
joth 2010/12/02 17:12:01 I rolled this comment into the TODO above to suppo
+ return true;
+ }
NOTIMPLEMENTED() << hostname;
return false;
}
« no previous file with comments | « net/base/x509_certificate_openssl.cc ('k') | net/http/des.cc » ('j') | net/http/des.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698