| Index: net/base/x509_certificate_openssl.cc
|
| diff --git a/net/base/x509_certificate_openssl.cc b/net/base/x509_certificate_openssl.cc
|
| index f37c9aacc701db546bf996f21bfc4690b2b173a6..43198dc76c1879660766785bf0a63248732fd537 100644
|
| --- a/net/base/x509_certificate_openssl.cc
|
| +++ b/net/base/x509_certificate_openssl.cc
|
| @@ -20,6 +20,7 @@
|
| #include "base/string_util.h"
|
| #include "crypto/openssl_util.h"
|
| #include "net/base/net_errors.h"
|
| +#include "net/base/net_util.h"
|
| #include "net/base/x509_util_openssl.h"
|
|
|
| #if defined(OS_ANDROID)
|
| @@ -123,7 +124,8 @@ void ParseSubjectAltName(X509Certificate::OSCertHandle cert,
|
| if (!ip_addr)
|
| continue;
|
| int ip_addr_len = name->d.iPAddress->length;
|
| - if (ip_addr_len != 4 && ip_addr_len != 8) {
|
| + if (ip_addr_len != static_cast<int>(kIPv4AddressSize) &&
|
| + ip_addr_len != static_cast<int>(kIPv6AddressSize)) {
|
| // http://www.ietf.org/rfc/rfc3280.txt requires subjectAltName iPAddress
|
| // to have 4 or 16 bytes, whereas in a name constraint it includes a
|
| // net mask hence 8 or 32 bytes. Logging to help diagnose any mixup.
|
|
|