| 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/ssl/client_cert_store_impl.h" | 5 #include "net/ssl/client_cert_store_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "net/base/cert_test_util.h" | |
| 14 #include "net/base/test_data_directory.h" | 13 #include "net/base/test_data_directory.h" |
| 14 #include "net/test/cert_test_util.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // "CN=Client Auth Test Root 1" - DER encoded DN of the issuer of client_1.pem. | 21 // "CN=Client Auth Test Root 1" - DER encoded DN of the issuer of client_1.pem. |
| 22 const unsigned char kAuthority1DN[] = { | 22 const unsigned char kAuthority1DN[] = { |
| 23 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, | 23 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, |
| 24 0x17, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x41, 0x75, 0x74, 0x68, | 24 0x17, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x41, 0x75, 0x74, 0x68, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 bool rv = store.SelectClientCertsGivenPreferred(cert_1, certs, *request, | 143 bool rv = store.SelectClientCertsGivenPreferred(cert_1, certs, *request, |
| 144 &selected_certs); | 144 &selected_certs); |
| 145 EXPECT_TRUE(rv); | 145 EXPECT_TRUE(rv); |
| 146 ASSERT_EQ(2u, selected_certs.size()); | 146 ASSERT_EQ(2u, selected_certs.size()); |
| 147 EXPECT_TRUE(selected_certs[0]->Equals(cert_1)); | 147 EXPECT_TRUE(selected_certs[0]->Equals(cert_1)); |
| 148 EXPECT_TRUE(selected_certs[1]->Equals(cert_2)); | 148 EXPECT_TRUE(selected_certs[1]->Equals(cert_2)); |
| 149 } | 149 } |
| 150 #endif | 150 #endif |
| 151 | 151 |
| 152 } // namespace net | 152 } // namespace net |
| OLD | NEW |