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/cert/x509_certificate.h" | 5 #include "net/cert/x509_certificate.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/pickle.h" | 12 #include "base/pickle.h" |
13 #include "base/sha1.h" | 13 #include "base/sha1.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "crypto/rsa_private_key.h" | 17 #include "crypto/rsa_private_key.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/base/test_data_directory.h" | |
20 #include "net/cert/asn1_util.h" | 19 #include "net/cert/asn1_util.h" |
21 #include "net/cert/x509_util_nss.h" | 20 #include "net/cert/x509_util_nss.h" |
22 #include "net/test/cert_test_util.h" | 21 #include "net/test/cert_test_util.h" |
23 #include "net/test/test_certificate_data.h" | 22 #include "net/test/test_certificate_data.h" |
| 23 #include "net/test/test_data_directory.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 #if defined(USE_NSS_CERTS) | 26 #if defined(USE_NSS_CERTS) |
27 #include <cert.h> | 27 #include <cert.h> |
28 #endif | 28 #endif |
29 | 29 |
30 using base::HexEncode; | 30 using base::HexEncode; |
31 using base::Time; | 31 using base::Time; |
32 | 32 |
33 namespace net { | 33 namespace net { |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 &actual_type); | 1168 &actual_type); |
1169 | 1169 |
1170 EXPECT_EQ(data.expected_bits, actual_bits); | 1170 EXPECT_EQ(data.expected_bits, actual_bits); |
1171 EXPECT_EQ(data.expected_type, actual_type); | 1171 EXPECT_EQ(data.expected_type, actual_type); |
1172 } | 1172 } |
1173 | 1173 |
1174 INSTANTIATE_TEST_CASE_P(, X509CertificatePublicKeyInfoTest, | 1174 INSTANTIATE_TEST_CASE_P(, X509CertificatePublicKeyInfoTest, |
1175 testing::ValuesIn(kPublicKeyInfoTestData)); | 1175 testing::ValuesIn(kPublicKeyInfoTestData)); |
1176 | 1176 |
1177 } // namespace net | 1177 } // namespace net |
OLD | NEW |