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 "chrome/common/net/x509_certificate_model.h" | 5 #include "chrome/common/net/x509_certificate_model.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "net/base/test_data_directory.h" | 8 #include "net/base/test_data_directory.h" |
9 #include "net/test/cert_test_util.h" | 9 #include "net/test/cert_test_util.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 #if defined(USE_NSS) | 12 #if defined(USE_NSS_CERTS) |
13 #include "crypto/scoped_test_nss_db.h" | 13 #include "crypto/scoped_test_nss_db.h" |
14 #include "net/cert/nss_cert_database.h" | 14 #include "net/cert/nss_cert_database.h" |
15 #endif | 15 #endif |
16 | 16 |
17 TEST(X509CertificateModelTest, GetCertNameOrNicknameAndGetTitle) { | 17 TEST(X509CertificateModelTest, GetCertNameOrNicknameAndGetTitle) { |
18 scoped_refptr<net::X509Certificate> cert( | 18 scoped_refptr<net::X509Certificate> cert( |
19 net::ImportCertFromFile(net::GetTestCertsDirectory(), | 19 net::ImportCertFromFile(net::GetTestCertsDirectory(), |
20 "root_ca_cert.pem")); | 20 "root_ca_cert.pem")); |
21 ASSERT_TRUE(cert.get()); | 21 ASSERT_TRUE(cert.get()); |
22 EXPECT_EQ( | 22 EXPECT_EQ( |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 "10 21 14 7F 1B 70 3D 89 1A 40 8A 06 2C 5D 50 19\n" | 438 "10 21 14 7F 1B 70 3D 89 1A 40 8A 06 2C 5D 50 19\n" |
439 "62 F9 C7 45 89 F2 3D 66 05 3D 7D 75 5B 55 1E 80\n" | 439 "62 F9 C7 45 89 F2 3D 66 05 3D 7D 75 5B 55 1E 80\n" |
440 "42 72 A1 9A 7C 6D 0A 74 F6 EE A6 21 6C 3A 98 FB\n" | 440 "42 72 A1 9A 7C 6D 0A 74 F6 EE A6 21 6C 3A 98 FB\n" |
441 "77 82 5F F2 6B 56 E6 DD 9B 8E 50 F0 C6 AE FD EA\n" | 441 "77 82 5F F2 6B 56 E6 DD 9B 8E 50 F0 C6 AE FD EA\n" |
442 "A6 05 07 A9 26 06 56 B3 B2 D9 B2 37 A0 21 3E 79\n" | 442 "A6 05 07 A9 26 06 56 B3 B2 D9 B2 37 A0 21 3E 79\n" |
443 "06 1F B9 51 BE F4 B1 49 4D 90 B5 33 E5 0E C7 5E\n" | 443 "06 1F B9 51 BE F4 B1 49 4D 90 B5 33 E5 0E C7 5E\n" |
444 "5B 40 C5 6A 04 D1 43 7A 94 6A A4 4F 61 FC 82 E0", | 444 "5B 40 C5 6A 04 D1 43 7A 94 6A A4 4F 61 FC 82 E0", |
445 x509_certificate_model::ProcessRawBitsSignatureWrap( | 445 x509_certificate_model::ProcessRawBitsSignatureWrap( |
446 cert->os_cert_handle())); | 446 cert->os_cert_handle())); |
447 } | 447 } |
OLD | NEW |