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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void PkitsTestInfo::SetInitialExplicitPolicy(bool b) { | 59 void PkitsTestInfo::SetInitialExplicitPolicy(bool b) { |
60 initial_explicit_policy = b; | 60 initial_explicit_policy = |
| 61 b ? InitialExplicitPolicy::kTrue : InitialExplicitPolicy::kFalse; |
61 } | 62 } |
62 | 63 |
63 void PkitsTestInfo::SetInitialPolicyMappingInhibit(bool b) { | 64 void PkitsTestInfo::SetInitialPolicyMappingInhibit(bool b) { |
64 initial_policy_mapping_inhibit = b; | 65 initial_policy_mapping_inhibit = b ? InitialPolicyMappingInhibit::kTrue |
| 66 : InitialPolicyMappingInhibit::kFalse; |
65 } | 67 } |
66 | 68 |
67 void PkitsTestInfo::SetInitialInhibitAnyPolicy(bool b) { | 69 void PkitsTestInfo::SetInitialInhibitAnyPolicy(bool b) { |
68 initial_inhibit_any_policy = b; | 70 initial_inhibit_any_policy = |
| 71 b ? InitialAnyPolicyInhibit::kTrue : InitialAnyPolicyInhibit::kFalse; |
69 } | 72 } |
70 | 73 |
71 PkitsTestInfo::~PkitsTestInfo() = default; | 74 PkitsTestInfo::~PkitsTestInfo() = default; |
72 | 75 |
73 void PkitsTestInfo::SetInitialPolicySet(const char* const policy_names) { | 76 void PkitsTestInfo::SetInitialPolicySet(const char* const policy_names) { |
74 SetPolicySetFromString(policy_names, &initial_policy_set); | 77 SetPolicySetFromString(policy_names, &initial_policy_set); |
75 } | 78 } |
76 | 79 |
77 void PkitsTestInfo::SetUserConstrainedPolicySet( | 80 void PkitsTestInfo::SetUserConstrainedPolicySet( |
78 const char* const policy_names) { | 81 const char* const policy_names) { |
79 SetPolicySetFromString(policy_names, &user_constrained_policy_set); | 82 SetPolicySetFromString(policy_names, &user_constrained_policy_set); |
80 } | 83 } |
81 | 84 |
82 } // namespace net | 85 } // namespace net |
OLD | NEW |