Skip to content

Commit 318da1f

Browse files
authored
Merge pull request #102346 from dotnet-maestro-bot/merge/release/6.0-to-release/6.0-staging
[automated] Merge branch 'release/6.0' => 'release/6.0-staging'
2 parents 98222b2 + 8eb7fbc commit 318da1f

File tree

12 files changed

+129
-107
lines changed

12 files changed

+129
-107
lines changed

NuGet.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<clear />
1010
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
1111
<!-- Begin: Package sources from dotnet-emsdk -->
12+
<add key="darc-pub-dotnet-emsdk-5a2faf3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-5a2faf37/nuget/v3/index.json" />
13+
<add key="darc-pub-dotnet-emsdk-1107112" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-1107112d/nuget/v3/index.json" />
1214
<add key="darc-pub-dotnet-emsdk-8601068" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-86010681/nuget/v3/index.json" />
1315
<!-- End: Package sources from dotnet-emsdk -->
1416
<!-- Begin: Package sources from dotnet-wcf -->

eng/Version.Details.xml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,77 +26,77 @@
2626
</Dependency>
2727
</ProductDependencies>
2828
<ToolsetDependencies>
29-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24204.4">
29+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24266.4">
3030
<Uri>https://github.com/dotnet/arcade</Uri>
31-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
31+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
3232
</Dependency>
33-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.24204.4">
33+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.24266.4">
3434
<Uri>https://github.com/dotnet/arcade</Uri>
35-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
35+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
3636
</Dependency>
37-
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.24204.4">
37+
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.24266.4">
3838
<Uri>https://github.com/dotnet/arcade</Uri>
39-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
39+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
4040
</Dependency>
41-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.24204.4">
41+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.24266.4">
4242
<Uri>https://github.com/dotnet/arcade</Uri>
43-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
43+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
4444
</Dependency>
45-
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.24204.4">
45+
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.24266.4">
4646
<Uri>https://github.com/dotnet/arcade</Uri>
47-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
47+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
4848
</Dependency>
49-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.24204.4">
49+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.24266.4">
5050
<Uri>https://github.com/dotnet/arcade</Uri>
51-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
51+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
5252
</Dependency>
53-
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.24204.4">
53+
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.24266.4">
5454
<Uri>https://github.com/dotnet/arcade</Uri>
55-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
55+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
5656
</Dependency>
57-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.24204.4">
57+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.24266.4">
5858
<Uri>https://github.com/dotnet/arcade</Uri>
59-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
59+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
6060
</Dependency>
61-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.24204.4">
61+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.24266.4">
6262
<Uri>https://github.com/dotnet/arcade</Uri>
63-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
63+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
6464
</Dependency>
65-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24204.4">
65+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24266.4">
6666
<Uri>https://github.com/dotnet/arcade</Uri>
67-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
67+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
6868
</Dependency>
69-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.24204.4">
69+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.24266.4">
7070
<Uri>https://github.com/dotnet/arcade</Uri>
71-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
71+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
7272
</Dependency>
73-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.24204.4">
73+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.24266.4">
7474
<Uri>https://github.com/dotnet/arcade</Uri>
75-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
75+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
7676
</Dependency>
77-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.24204.4">
77+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.24266.4">
7878
<Uri>https://github.com/dotnet/arcade</Uri>
79-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
79+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
8080
</Dependency>
81-
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.24204.4">
81+
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.24266.4">
8282
<Uri>https://github.com/dotnet/arcade</Uri>
83-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
83+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
8484
</Dependency>
85-
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.24204.4">
85+
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.24266.4">
8686
<Uri>https://github.com/dotnet/arcade</Uri>
87-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
87+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
8888
</Dependency>
89-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.24204.4">
89+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.24266.4">
9090
<Uri>https://github.com/dotnet/arcade</Uri>
91-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
91+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
9292
</Dependency>
93-
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.24204.4">
93+
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.24266.4">
9494
<Uri>https://github.com/dotnet/arcade</Uri>
95-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
95+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
9696
</Dependency>
97-
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.24204.4">
97+
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.24266.4">
9898
<Uri>https://github.com/dotnet/arcade</Uri>
99-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
99+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
100100
</Dependency>
101101
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201201-01">
102102
<Uri>https://github.com/microsoft/vstest</Uri>
@@ -222,9 +222,9 @@
222222
<Uri>https://github.com/dotnet/xharness</Uri>
223223
<Sha>d1dd9c2ce3fc0b9358d2cda64c52d052d1a612c1</Sha>
224224
</Dependency>
225-
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.24204.4">
225+
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.24266.4">
226226
<Uri>https://github.com/dotnet/arcade</Uri>
227-
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
227+
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
228228
</Dependency>
229229
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21416.5">
230230
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>

eng/Versions.props

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project>
22
<PropertyGroup>
33
<!-- The .NET product branding version -->
4-
<ProductVersion>6.0.31</ProductVersion>
4+
<ProductVersion>6.0.32</ProductVersion>
55
<!-- File version numbers -->
66
<MajorVersion>6</MajorVersion>
77
<MinorVersion>0</MinorVersion>
8-
<PatchVersion>31</PatchVersion>
8+
<PatchVersion>32</PatchVersion>
99
<SdkBandVersion>6.0.400</SdkBandVersion>
1010
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
1111
<PreReleaseVersionIteration>
@@ -42,21 +42,21 @@
4242
<!-- SDK dependencies -->
4343
<MicrosoftDotNetCompatibilityVersion>1.1.0-preview.22164.17</MicrosoftDotNetCompatibilityVersion>
4444
<!-- Arcade dependencies -->
45-
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.24204.4</MicrosoftDotNetApiCompatVersion>
46-
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksFeedVersion>
47-
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.24204.4</MicrosoftDotNetCodeAnalysisVersion>
48-
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.24204.4</MicrosoftDotNetGenAPIVersion>
49-
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.24204.4</MicrosoftDotNetGenFacadesVersion>
50-
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.24204.4</MicrosoftDotNetXUnitExtensionsVersion>
51-
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.24204.4</MicrosoftDotNetXUnitConsoleRunnerVersion>
52-
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksArchivesVersion>
53-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksInstallersVersion>
54-
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksPackagingVersion>
55-
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksTemplatingVersion>
56-
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
57-
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.24204.4</MicrosoftDotNetRemoteExecutorVersion>
58-
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.24204.4</MicrosoftDotNetVersionToolsTasksVersion>
59-
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.24204.4</MicrosoftDotNetPackageTestingVersion>
45+
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.24266.4</MicrosoftDotNetApiCompatVersion>
46+
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksFeedVersion>
47+
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.24266.4</MicrosoftDotNetCodeAnalysisVersion>
48+
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.24266.4</MicrosoftDotNetGenAPIVersion>
49+
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.24266.4</MicrosoftDotNetGenFacadesVersion>
50+
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.24266.4</MicrosoftDotNetXUnitExtensionsVersion>
51+
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.24266.4</MicrosoftDotNetXUnitConsoleRunnerVersion>
52+
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksArchivesVersion>
53+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksInstallersVersion>
54+
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksPackagingVersion>
55+
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksTemplatingVersion>
56+
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
57+
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.24266.4</MicrosoftDotNetRemoteExecutorVersion>
58+
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.24266.4</MicrosoftDotNetVersionToolsTasksVersion>
59+
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.24266.4</MicrosoftDotNetPackageTestingVersion>
6060
<!-- NuGet dependencies -->
6161
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
6262
<!-- Installer dependencies -->

eng/common/templates-official/job/source-index-stage1.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
runAsPublic: false
3-
sourceIndexPackageVersion: 1.0.1-20210614.1
3+
sourceIndexPackageVersion: 1.0.1-20240320.1
44
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
55
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
66
preSteps: []
@@ -32,10 +32,10 @@ jobs:
3232
- ${{ preStep }}
3333

3434
- task: UseDotNet@2
35-
displayName: Use .NET Core sdk 3.1
35+
displayName: Use .NET 8 SDK
3636
inputs:
3737
packageType: sdk
38-
version: 3.1.x
38+
version: 8.0.x
3939
installationPath: $(Agent.TempDirectory)/dotnet
4040
workingDirectory: $(Agent.TempDirectory)
4141

eng/common/templates-official/jobs/source-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
1515
defaultManagedPlatform:
1616
name: 'Managed'
17-
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
17+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'
1818

1919
# Defines the platforms on which to run build jobs. One job is created for each platform, and the
2020
# object in this array is sent to the job template as 'platform'. If no platforms are specified,

eng/common/templates/job/source-index-stage1.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
runAsPublic: false
3-
sourceIndexPackageVersion: 1.0.1-20210614.1
3+
sourceIndexPackageVersion: 1.0.1-20240320.1
44
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
55
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
66
preSteps: []
@@ -30,10 +30,10 @@ jobs:
3030
- ${{ preStep }}
3131

3232
- task: UseDotNet@2
33-
displayName: Use .NET Core sdk 3.1
33+
displayName: Use .NET 8 SDK
3434
inputs:
3535
packageType: sdk
36-
version: 3.1.x
36+
version: 8.0.x
3737
installationPath: $(Agent.TempDirectory)/dotnet
3838
workingDirectory: $(Agent.TempDirectory)
3939

eng/common/templates/jobs/source-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
1515
defaultManagedPlatform:
1616
name: 'Managed'
17-
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
17+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'
1818

1919
# Defines the platforms on which to run build jobs. One job is created for each platform, and the
2020
# object in this array is sent to the job template as 'platform'. If no platforms are specified,

global.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"sdk": {
3-
"version": "6.0.128",
3+
"version": "6.0.130",
44
"allowPrerelease": true,
55
"rollForward": "major"
66
},
77
"tools": {
8-
"dotnet": "6.0.128"
8+
"dotnet": "6.0.130"
99
},
1010
"native-tools": {
1111
"cmake": "3.16.4",
1212
"python3": "3.7.1"
1313
},
1414
"msbuild-sdks": {
15-
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.24204.4",
16-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24204.4",
17-
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.24204.4",
18-
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.24204.4",
15+
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.24266.4",
16+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24266.4",
17+
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.24266.4",
18+
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.24266.4",
1919
"Microsoft.Build.NoTargets": "3.1.0",
2020
"Microsoft.Build.Traversal": "3.0.23",
2121
"Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21415.6"

src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/pal_x509.c

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,18 @@ PAL_X509ContentType AppleCryptoNative_X509GetContentType(uint8_t* pbData, int32_
106106
// The sniffing order is:
107107
// * X509 DER
108108
// * PKCS7 PEM/DER
109-
// * PKCS12 DER (or PEM if Apple has non-standard support for that)
110109
// * X509 PEM or PEM aggregate (or DER, but that already matched)
111110
//
112111
// If the X509 PEM check is done first SecItemImport will erroneously match
113112
// some PKCS#7 blobs and say they were certificates.
114113
//
115114
// Likewise, if the X509 DER check isn't done first, Apple will report it as
116115
// being a PKCS#7.
116+
//
117+
// This does not attempt to open a PFX / PKCS12 as Apple does not provide
118+
// a suitable API to determine if it is PKCS12 without doing potentially
119+
// unbound MAC / KDF work. Instead, let that return Unknown and let the managed
120+
// decoding do the check.
117121
SecCertificateRef certref = SecCertificateCreateWithData(NULL, cfData);
118122

119123
if (certref != NULL)
@@ -140,41 +144,6 @@ PAL_X509ContentType AppleCryptoNative_X509GetContentType(uint8_t* pbData, int32_
140144
}
141145
}
142146

143-
dataFormat = kSecFormatPKCS12;
144-
actualFormat = dataFormat;
145-
itemType = kSecItemTypeAggregate;
146-
actualType = itemType;
147-
148-
osStatus = SecItemImport(cfData, NULL, &actualFormat, &actualType, 0, NULL, NULL, NULL);
149-
150-
if (osStatus == errSecPassphraseRequired)
151-
{
152-
dataFormat = kSecFormatPKCS12;
153-
actualFormat = dataFormat;
154-
itemType = kSecItemTypeAggregate;
155-
actualType = itemType;
156-
157-
SecItemImportExportKeyParameters importParams;
158-
memset(&importParams, 0, sizeof(SecItemImportExportKeyParameters));
159-
160-
importParams.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION;
161-
importParams.passphrase = CFSTR("");
162-
163-
osStatus = SecItemImport(cfData, NULL, &actualFormat, &actualType, 0, &importParams, NULL, NULL);
164-
165-
CFRelease(importParams.passphrase);
166-
importParams.passphrase = NULL;
167-
}
168-
169-
if (osStatus == noErr || osStatus == errSecPkcs12VerifyFailure)
170-
{
171-
if (actualType == itemType && actualFormat == dataFormat)
172-
{
173-
CFRelease(cfData);
174-
return PAL_Pkcs12;
175-
}
176-
}
177-
178147
dataFormat = kSecFormatX509Cert;
179148
actualFormat = dataFormat;
180149
itemType = kSecItemTypeCertificate;

src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/X509Pal.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public X509ContentType GetCertContentType(ReadOnlySpan<byte> rawData)
123123

124124
X509ContentType contentType = Interop.AppleCrypto.X509GetContentType(rawData);
125125

126-
// Apple doesn't seem to recognize PFX files with no MAC, so try a quick maybe-it's-a-PFX test
126+
// Apple's native check can't check for PKCS12, so do a quick decode test to see if it is PKCS12 / PFX.
127127
if (contentType == X509ContentType.Unknown)
128128
{
129129
try
@@ -132,9 +132,11 @@ public X509ContentType GetCertContentType(ReadOnlySpan<byte> rawData)
132132
{
133133
fixed (byte* pin = rawData)
134134
{
135+
AsnValueReader reader = new AsnValueReader(rawData, AsnEncodingRules.BER);
136+
135137
using (var manager = new PointerMemoryManager<byte>(pin, rawData.Length))
136138
{
137-
PfxAsn.Decode(manager.Memory, AsnEncodingRules.BER);
139+
PfxAsn.Decode(ref reader, manager.Memory, out _);
138140
}
139141

140142
contentType = X509ContentType.Pkcs12;

0 commit comments

Comments
 (0)