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..d28a4dc305261cd8b66f7aa9ffb3e53ebbf0a014 100644 |
| --- a/net/base/x509_openssl_util.cc |
| +++ b/net/base/x509_openssl_util.cc |
| @@ -149,8 +149,16 @@ bool VerifyHostname(const std::string& hostname, |
| } |
| DCHECK(!reference_name.empty()); |
| - // TODO(joth): Add IP address support. See http://crbug.com/62973 |
| if (found_ip6_chars || !found_alpha) { |
| + // For now we just do simple localhost IP address support, primarily as |
| + // it's needed by the test server. TODO(joth): Replace this with full IP |
| + // address support. See http://crbug.com/62973 |
| + if (hostname == "127.0.0.1" && |
| + std::find(cert_names.begin(), cert_names.end(), hostname) |
| + != cert_names.end()) { |
|
wtc
2010/12/01 22:50:05
Nit: Chromium's style guide recommend folding long
joth
2010/12/02 17:12:01
Done.
|
| + DVLOG(1) << "Allowing localhost IP certificate: " << hostname; |
| + return true; |
| + } |
| NOTIMPLEMENTED() << hostname; |
| return false; |
| } |