| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/x509_certificate.h" | 5 #include "net/cert/x509_certificate.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
| 11 #include "base/sha1.h" | 11 #include "base/sha1.h" |
| 12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
| 13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
| 14 #include "crypto/rsa_private_key.h" | 14 #include "crypto/rsa_private_key.h" |
| 15 #include "net/base/asn1_util.h" | |
| 16 #include "net/base/cert_test_util.h" | |
| 17 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 18 #include "net/base/test_certificate_data.h" | |
| 19 #include "net/base/test_data_directory.h" | 16 #include "net/base/test_data_directory.h" |
| 17 #include "net/cert/asn1_util.h" |
| 18 #include "net/cert/test_certificate_data.h" |
| 19 #include "net/test/cert_test_util.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 #if defined(USE_NSS) | 22 #if defined(USE_NSS) |
| 23 #include <cert.h> | 23 #include <cert.h> |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 using base::HexEncode; | 26 using base::HexEncode; |
| 27 using base::Time; | 27 using base::Time; |
| 28 | 28 |
| 29 namespace net { | 29 namespace net { |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 EXPECT_EQ(test_data.expected, X509Certificate::VerifyHostname( | 1163 EXPECT_EQ(test_data.expected, X509Certificate::VerifyHostname( |
| 1164 test_data.hostname, common_name, dns_names, ip_addressses)); | 1164 test_data.hostname, common_name, dns_names, ip_addressses)); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 INSTANTIATE_TEST_CASE_P(, X509CertificateNameVerifyTest, | 1167 INSTANTIATE_TEST_CASE_P(, X509CertificateNameVerifyTest, |
| 1168 testing::ValuesIn(kNameVerifyTestData)); | 1168 testing::ValuesIn(kNameVerifyTestData)); |
| 1169 | 1169 |
| 1170 } // namespace net | 1170 } // namespace net |
| OLD | NEW |