Chromium Code Reviews| 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; |
| } |