OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/internal/nist_pkits_unittest.h" | 5 #include "net/cert/internal/nist_pkits_unittest.h" |
6 | 6 |
7 #include "base/strings/string_split.h" | 7 #include "base/strings/string_split.h" |
8 #include "net/cert/internal/certificate_policies.h" | 8 #include "net/cert/internal/certificate_policies.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 } // namespace | 52 } // namespace |
53 | 53 |
54 PkitsTestInfo::PkitsTestInfo() { | 54 PkitsTestInfo::PkitsTestInfo() { |
55 SetInitialPolicySet("anyPolicy"); | 55 SetInitialPolicySet("anyPolicy"); |
56 SetUserConstrainedPolicySet("NIST-test-policy-1"); | 56 SetUserConstrainedPolicySet("NIST-test-policy-1"); |
57 } | 57 } |
58 | 58 |
| 59 PkitsTestInfo::PkitsTestInfo(const PkitsTestInfo& other) = default; |
| 60 |
| 61 PkitsTestInfo::~PkitsTestInfo() = default; |
| 62 |
59 void PkitsTestInfo::SetInitialExplicitPolicy(bool b) { | 63 void PkitsTestInfo::SetInitialExplicitPolicy(bool b) { |
60 initial_explicit_policy = | 64 initial_explicit_policy = |
61 b ? InitialExplicitPolicy::kTrue : InitialExplicitPolicy::kFalse; | 65 b ? InitialExplicitPolicy::kTrue : InitialExplicitPolicy::kFalse; |
62 } | 66 } |
63 | 67 |
64 void PkitsTestInfo::SetInitialPolicyMappingInhibit(bool b) { | 68 void PkitsTestInfo::SetInitialPolicyMappingInhibit(bool b) { |
65 initial_policy_mapping_inhibit = b ? InitialPolicyMappingInhibit::kTrue | 69 initial_policy_mapping_inhibit = b ? InitialPolicyMappingInhibit::kTrue |
66 : InitialPolicyMappingInhibit::kFalse; | 70 : InitialPolicyMappingInhibit::kFalse; |
67 } | 71 } |
68 | 72 |
69 void PkitsTestInfo::SetInitialInhibitAnyPolicy(bool b) { | 73 void PkitsTestInfo::SetInitialInhibitAnyPolicy(bool b) { |
70 initial_inhibit_any_policy = | 74 initial_inhibit_any_policy = |
71 b ? InitialAnyPolicyInhibit::kTrue : InitialAnyPolicyInhibit::kFalse; | 75 b ? InitialAnyPolicyInhibit::kTrue : InitialAnyPolicyInhibit::kFalse; |
72 } | 76 } |
73 | 77 |
74 PkitsTestInfo::~PkitsTestInfo() = default; | |
75 | |
76 void PkitsTestInfo::SetInitialPolicySet(const char* const policy_names) { | 78 void PkitsTestInfo::SetInitialPolicySet(const char* const policy_names) { |
77 SetPolicySetFromString(policy_names, &initial_policy_set); | 79 SetPolicySetFromString(policy_names, &initial_policy_set); |
78 } | 80 } |
79 | 81 |
80 void PkitsTestInfo::SetUserConstrainedPolicySet( | 82 void PkitsTestInfo::SetUserConstrainedPolicySet( |
81 const char* const policy_names) { | 83 const char* const policy_names) { |
82 SetPolicySetFromString(policy_names, &user_constrained_policy_set); | 84 SetPolicySetFromString(policy_names, &user_constrained_policy_set); |
83 } | 85 } |
84 | 86 |
85 } // namespace net | 87 } // namespace net |
OLD | NEW |