Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(734)

Side by Side Diff: net/ssl/client_cert_store_unittest-inl.h

Issue 2185403003: Return the certificate chain in ClientCertStoreNSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rsleevi comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef NET_SSL_CLIENT_CERT_STORE_UNITTEST_INL_H_ 5 #ifndef NET_SSL_CLIENT_CERT_STORE_UNITTEST_INL_H_
6 #define NET_SSL_CLIENT_CERT_STORE_UNITTEST_INL_H_ 6 #define NET_SSL_CLIENT_CERT_STORE_UNITTEST_INL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "net/ssl/ssl_cert_request_info.h" 14 #include "net/ssl/ssl_cert_request_info.h"
15 #include "net/test/cert_test_util.h" 15 #include "net/test/cert_test_util.h"
16 #include "net/test/test_data_directory.h" 16 #include "net/test/test_data_directory.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 namespace { 21 namespace {
22 22
23 // "CN=B CA" - DER encoded DN of the issuer of client_1.pem 23 // "CN=B CA" - DER encoded DN of the issuer of client_1.pem
24 const unsigned char kAuthority1DN[] = { 24 const unsigned char kAuthority1DN[] = {
25 0x30, 0x0f, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 25 0x30, 0x0f, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55,
26 0x04, 0x42, 0x20, 0x43, 0x41 26 0x04, 0x03, 0x0c, 0x04, 0x42, 0x20, 0x43, 0x41,
27 }; 27 };
28 28
29 // "CN=E CA" - DER encoded DN of the issuer of client_2.pem 29 // "CN=E CA" - DER encoded DN of the issuer of client_2.pem
30 unsigned char kAuthority2DN[] = { 30 const unsigned char kAuthority2DN[] = {
31 0x30, 0x0f, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 31 0x30, 0x0f, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55,
32 0x04, 0x45, 0x20, 0x43, 0x41 32 0x04, 0x03, 0x0c, 0x04, 0x45, 0x20, 0x43, 0x41,
33 };
34
35 // "CN=C Root CA" - DER encoded DN of the issuer of client_1_ca.pem,
36 // client_2_ca.pem, and client_3_ca.pem.
37 const unsigned char kAuthorityRootDN[] = {
38 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03,
39 0x0c, 0x09, 0x43, 0x20, 0x52, 0x6f, 0x6f, 0x74, 0x20, 0x43, 0x41,
33 }; 40 };
34 41
35 } // namespace 42 } // namespace
36 43
37 // Use a templated test to provide common testcases for all the platform 44 // Use a templated test to provide common testcases for all the platform
38 // implementations of ClientCertStore. These cases test the client cert 45 // implementations of ClientCertStore. These cases test the client cert
39 // filtering behavior. 46 // filtering behavior.
40 // 47 //
41 // NOTE: If any test cases are added, removed, or renamed, the 48 // NOTE: If any test cases are added, removed, or renamed, the
42 // REGISTER_TYPED_TEST_CASE_P macro at the bottom of this file must be updated. 49 // REGISTER_TYPED_TEST_CASE_P macro at the bottom of this file must be updated.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 127 }
121 128
122 REGISTER_TYPED_TEST_CASE_P(ClientCertStoreTest, 129 REGISTER_TYPED_TEST_CASE_P(ClientCertStoreTest,
123 EmptyQuery, 130 EmptyQuery,
124 AllIssuersAllowed, 131 AllIssuersAllowed,
125 CertAuthorityFiltering); 132 CertAuthorityFiltering);
126 133
127 } // namespace net 134 } // namespace net
128 135
129 #endif // NET_SSL_CLIENT_CERT_STORE_UNITTEST_INL_H_ 136 #endif // NET_SSL_CLIENT_CERT_STORE_UNITTEST_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698