Skip to content

Commit f7c1a44

Browse files
authored
Make config not experimental and add GP to control it (#3585)
Remove the configuration experimental feature and add a group policy for it instead. This required moving the GP code and dependencies into the shared library.
1 parent 721c81f commit f7c1a44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+178
-118
lines changed

doc/admx/DesktopAppInstaller.admx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,15 @@
156156
<decimal value="0" />
157157
</disabledValue>
158158
</policy>
159+
<policy name="EnableWindowsPackageManagerConfiguration" class="Machine" displayName="$(string.EnableWindowsPackageManagerConfiguration)" explainText="$(string.EnableWindowsPackageManagerConfigurationExplanation)" key="Software\Policies\Microsoft\Windows\AppInstaller" valueName="EnableWindowsPackageManagerConfiguration">
160+
<parentCategory ref="AppInstaller" />
161+
<supportedOn ref="windows:SUPPORTED_Windows_10_0_RS5" />
162+
<enabledValue>
163+
<decimal value="1" />
164+
</enabledValue>
165+
<disabledValue>
166+
<decimal value="0" />
167+
</disabledValue>
168+
</policy>
159169
</policies>
160170
</policyDefinitions>

doc/admx/en-US/DesktopAppInstaller.adml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ If you disable or do not configure this setting, users will not be able to insta
103103
If you enable, or do not configuring this policy, users will be able to execute the Windows Package Manager CLI commands, and PowerShell cmdlets. (Provided “Enable App Installer” policy is not disabled).
104104

105105
This policy does not override the “Enable App Installer” policy.</string>
106+
<string id="EnableWindowsPackageManagerConfiguration">Enable Windows Package Manager Configuration</string>
107+
<string id="EnableWindowsPackageManagerConfigurationExplanation">This policy controls whether the Windows Package Manager configuration feature can be used by users.
108+
109+
If you enable or do not configure this setting, users will be able to use the Windows Package Manager configuration feature.
110+
111+
If you disable this setting, users will not be able to use the Windows Package Manager configuration feature.</string>
106112
</stringTable>
107113
<presentationTable>
108114
<presentation id="SourceAutoUpdateInterval">

src/AppInstallerCLICore/Commands/ConfigureCommand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using namespace AppInstaller::CLI::Workflow;
1414
namespace AppInstaller::CLI
1515
{
1616
ConfigureCommand::ConfigureCommand(std::string_view parent) :
17-
Command("configure", { "configuration" }, parent, Settings::ExperimentalFeature::Feature::Configuration)
17+
Command("configure", { "configuration" }, parent, Settings::TogglePolicy::Policy::Configuration)
1818
{
1919
SelectCurrentCommandIfUnrecognizedSubcommandFound(true);
2020
}

src/AppInstallerCLIE2ETests/ConfigureCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public class ConfigureCommand
2323
[OneTimeSetUp]
2424
public void OneTimeSetup()
2525
{
26-
WinGetSettingsHelper.ConfigureFeature("configuration", true);
2726
this.DeleteTxtFiles();
2827
}
2928

src/AppInstallerCLIE2ETests/ConfigureShowCommand.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ namespace AppInstallerCLIE2ETests
1414
/// </summary>
1515
public class ConfigureShowCommand
1616
{
17-
/// <summary>
18-
/// Setup done once before all the tests here.
19-
/// </summary>
20-
[OneTimeSetUp]
21-
public void OneTimeSetup()
22-
{
23-
WinGetSettingsHelper.ConfigureFeature("configuration", true);
24-
}
25-
2617
/// <summary>
2718
/// Simple test to confirm that a resource without a module specified can be discovered in the PSGallery.
2819
/// </summary>

src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class ConfigureTestCommand
2424
[OneTimeSetUp]
2525
public void OneTimeSetup()
2626
{
27-
WinGetSettingsHelper.ConfigureFeature("configuration", true);
2827
this.DeleteTxtFiles();
2928
}
3029

src/AppInstallerCLIE2ETests/ConfigureValidateCommand.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ public class ConfigureValidateCommand
1616
{
1717
private const string Command = "configure validate";
1818

19-
/// <summary>
20-
/// Setup done once before all the tests here.
21-
/// </summary>
22-
[OneTimeSetUp]
23-
public void OneTimeSetup()
24-
{
25-
WinGetSettingsHelper.ConfigureFeature("configuration", true);
26-
}
27-
2819
/// <summary>
2920
/// The configuration file is empty.
3021
/// </summary>

src/AppInstallerCLIE2ETests/GroupPolicy.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,19 @@ public void SourceAutoUpdateInterval()
223223
Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode);
224224
Assert.IsTrue(result.StdOut.Contains("Source Auto Update Interval In Minutes 123"));
225225
}
226+
227+
/// <summary>
228+
/// Test configuration is disabled by policy.
229+
/// </summary>
230+
[Test]
231+
public void EnableConfiguration()
232+
{
233+
GroupPolicyHelper.EnableConfiguration.Disable();
234+
var result = TestCommon.RunAICLICommand("configure", TestCommon.GetTestDataFile("Configuration\\ShowDetails_TestRepo.yml"));
235+
Assert.AreEqual(Constants.ErrorCode.ERROR_BLOCKED_BY_POLICY, result.ExitCode);
236+
237+
result = TestCommon.RunAICLICommand("configure show", TestCommon.GetTestDataFile("Configuration\\ShowDetails_TestRepo.yml"));
238+
Assert.AreEqual(Constants.ErrorCode.ERROR_BLOCKED_BY_POLICY, result.ExitCode);
239+
}
226240
}
227241
}

src/AppInstallerCLIE2ETests/GroupPolicyHelper.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ private GroupPolicyHelper(string name, string elementId)
113113
/// </summary>
114114
public static GroupPolicyHelper EnableAllowedSources { get; private set; } = new GroupPolicyHelper("EnableAllowedSources", "AllowedSources");
115115

116+
/// <summary>
117+
/// Gets the Enable Windows Package Manager Configuration Interfaces policy.
118+
/// </summary>
119+
public static GroupPolicyHelper EnableConfiguration { get; private set; } = new GroupPolicyHelper("EnableWindowsPackageManagerConfiguration");
120+
116121
/// <summary>
117122
/// Gets the Enable auto update interval policy.
118123
/// </summary>
@@ -132,6 +137,7 @@ private GroupPolicyHelper(string name, string elementId)
132137
EnableAllowedSources,
133138
SourceAutoUpdateInterval,
134139
EnableWinGetCommandLineInterfaces,
140+
EnableConfiguration,
135141
};
136142

137143
/// <summary>

src/AppInstallerCLIE2ETests/Helpers/WinGetSettingsHelper.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ public static void InitializeAllFeatures(bool status)
207207
ConfigureFeature("experimentalCmd", status);
208208
ConfigureFeature("directMSI", status);
209209
ConfigureFeature("pinning", status);
210-
ConfigureFeature("configuration", status);
211210
}
212211

213212
private static JObject GetJsonSettingsObject(string objectName)

src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,4 +2077,7 @@ Please specify one of them using the --source option to proceed.</value>
20772077
<value>`--module-path` value must be `currentuser`, `allusers`, `default` or an absolute path.</value>
20782078
<comment>{Locked="{--module-path}, {currentuser}, {allusers}, {default}}</comment>
20792079
</data>
2080+
<data name="PolicyEnableWinGetConfiguration" xml:space="preserve">
2081+
<value>Enable Windows Package Manager Configuration</value>
2082+
</data>
20802083
</root>

src/AppInstallerCLITests/Certificates.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,76 +13,76 @@ using namespace AppInstaller::Certificates;
1313
TEST_CASE("Certificates_NoPinningSucceeds", "[certificates]")
1414
{
1515
PinningDetails expected;
16-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::None);
16+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::None);
1717

1818
PinningDetails actual;
19-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
19+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
2020

2121
REQUIRE(expected.Validate(actual.GetCertificate()));
2222
}
2323

2424
TEST_CASE("Certificates_PublicKeyMismatch", "[certificates]")
2525
{
2626
PinningDetails expected;
27-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
27+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
2828

2929
PinningDetails actual;
30-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
30+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
3131

3232
REQUIRE(!expected.Validate(actual.GetCertificate()));
3333
}
3434

3535
TEST_CASE("Certificates_PublicKeyMatch", "[certificates]")
3636
{
3737
PinningDetails expected;
38-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
38+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
3939

4040
PinningDetails actual;
41-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2);
41+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE);
4242

4343
REQUIRE(expected.Validate(actual.GetCertificate()));
4444
}
4545

4646
TEST_CASE("Certificates_SubjectMismatch", "[certificates]")
4747
{
4848
PinningDetails expected;
49-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::Subject);
49+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject);
5050

5151
PinningDetails actual;
52-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2);
52+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE);
5353

5454
REQUIRE(!expected.Validate(actual.GetCertificate()));
5555
}
5656

5757
TEST_CASE("Certificates_SubjectMatch", "[certificates]")
5858
{
5959
PinningDetails expected;
60-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2).SetPinning(PinningVerificationType::Subject);
60+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject);
6161

6262
PinningDetails actual;
63-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2);
63+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE);
6464

6565
REQUIRE(expected.Validate(actual.GetCertificate()));
6666
}
6767

6868
TEST_CASE("Certificates_IssuerMismatch", "[certificates]")
6969
{
7070
PinningDetails expected;
71-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2).SetPinning(PinningVerificationType::Issuer);
71+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Issuer);
7272

7373
PinningDetails actual;
74-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
74+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
7575

7676
REQUIRE(!expected.Validate(actual.GetCertificate()));
7777
}
7878

7979
TEST_CASE("Certificates_IssuerMatch", "[certificates]")
8080
{
8181
PinningDetails expected;
82-
expected.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2).SetPinning(PinningVerificationType::Issuer);
82+
expected.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Issuer);
8383

8484
PinningDetails actual;
85-
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
85+
actual.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
8686

8787
REQUIRE(expected.Validate(actual.GetCertificate()));
8888
}
@@ -91,15 +91,15 @@ TEST_CASE("Certificates_ChainLengthDiffers", "[certificates]")
9191
{
9292
PinningChain chain;
9393
auto chainElement = chain.Root();
94-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
94+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
9595
chainElement = chainElement.Next();
96-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
96+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
9797

9898
PinningConfiguration config;
9999
config.AddChain(chain);
100100

101101
PinningDetails details;
102-
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
102+
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
103103

104104
REQUIRE(!config.Validate(details.GetCertificate()));
105105
}
@@ -112,7 +112,7 @@ TEST_CASE("Certificates_EmptyChainRejects", "[certificates]")
112112
config.AddChain(chain);
113113

114114
PinningDetails details;
115-
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
115+
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
116116

117117
REQUIRE(!config.Validate(details.GetCertificate()));
118118
}
@@ -121,17 +121,17 @@ TEST_CASE("Certificates_ChainOrderDiffers", "[certificates]")
121121
{
122122
PinningChain chain;
123123
auto chainElement = chain.Root();
124-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
124+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
125125
chainElement = chainElement.Next();
126-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
126+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
127127
chainElement = chainElement.Next();
128-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
128+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
129129

130130
PinningConfiguration config;
131131
config.AddChain(chain);
132132

133133
PinningDetails details;
134-
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
134+
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
135135

136136
REQUIRE(!config.Validate(details.GetCertificate()));
137137
}
@@ -140,17 +140,17 @@ TEST_CASE("Certificates_StoreChain_BuiltInTest", "[certificates]")
140140
{
141141
PinningChain chain;
142142
auto chainElement = chain.Root();
143-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
143+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
144144
chainElement = chainElement.Next();
145-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
145+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
146146
chainElement = chainElement.Next();
147-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
147+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
148148

149149
PinningConfiguration config;
150150
config.AddChain(chain);
151151

152152
PinningDetails details;
153-
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
153+
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
154154

155155
REQUIRE(config.Validate(details.GetCertificate()));
156156
}
@@ -159,27 +159,27 @@ TEST_CASE("Certificates_MultipleChains_Success", "[certificates]")
159159
{
160160
PinningChain chainOutOfOrder;
161161
auto chainElement = chainOutOfOrder.Root();
162-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
162+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
163163
chainElement = chainElement.Next();
164-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
164+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
165165
chainElement = chainElement.Next();
166-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
166+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
167167

168168
PinningConfiguration config;
169169
config.AddChain(chainOutOfOrder);
170170

171171
PinningChain chain;
172172
chainElement = chain.Root();
173-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2).SetPinning(PinningVerificationType::PublicKey);
173+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::PublicKey);
174174
chainElement = chainElement.Next();
175-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
175+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
176176
chainElement = chainElement.Next();
177-
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
177+
chainElement->LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE).SetPinning(PinningVerificationType::Subject | PinningVerificationType::Issuer);
178178

179179
config.AddChain(chain);
180180

181181
PinningDetails details;
182-
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
182+
details.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
183183

184184
REQUIRE(config.Validate(details.GetCertificate()));
185185
}

src/AppInstallerCLITests/GroupPolicy.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,11 @@ TEST_CASE("GroupPolicy_Sources", "[groupPolicy]")
280280
auto additionalSourcesKey = RegCreateVolatileSubKey(policiesKey.get(), AdditionalSourcesPolicyKeyName);
281281

282282
PinningDetails rootCert;
283-
rootCert.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2);
283+
rootCert.LoadCertificate(IDX_CERTIFICATE_STORE_ROOT_2, CERTIFICATE_RESOURCE_TYPE);
284284
PinningDetails intermediateCert;
285-
intermediateCert.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2);
285+
intermediateCert.LoadCertificate(IDX_CERTIFICATE_STORE_INTERMEDIATE_2, CERTIFICATE_RESOURCE_TYPE);
286286
PinningDetails leafCert;
287-
leafCert.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2);
287+
leafCert.LoadCertificate(IDX_CERTIFICATE_STORE_LEAF_2, CERTIFICATE_RESOURCE_TYPE);
288288

289289
auto getBytesString = [](const PinningDetails& details)
290290
{
@@ -375,6 +375,7 @@ TEST_CASE("GroupPolicy_AllEnabled", "[groupPolicy]")
375375
SetRegistryValue(policiesKey.get(), AllowedSourcesPolicyValueName, 1);
376376
SetRegistryValue(policiesKey.get(), BypassCertificatePinningForMicrosoftStoreValueName, 1);
377377
SetRegistryValue(policiesKey.get(), EnableWindowsPackageManagerCommandLineInterfaces, 1);
378+
SetRegistryValue(policiesKey.get(), ConfigurationPolicyValueName, 1);
378379

379380
GroupPolicy groupPolicy{ policiesKey.get() };
380381
for (const auto& policy : TogglePolicy::GetAllPolicies())

0 commit comments

Comments
 (0)