Skip to content

Commit

Permalink
Merge pull request #102346 from dotnet-maestro-bot/merge/release/6.0-…
Browse files Browse the repository at this point in the history
…to-release/6.0-staging

[automated] Merge branch 'release/6.0' => 'release/6.0-staging'
  • Loading branch information
carlossanlop authored Jun 10, 2024
2 parents 98222b2 + 8eb7fbc commit 318da1f
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 107 deletions.
2 changes: 2 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<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" />
<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" />
<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" />
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from dotnet-wcf -->
Expand Down
76 changes: 38 additions & 38 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,77 +26,77 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.24204.4">
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201201-01">
<Uri>https://github.com/microsoft/vstest</Uri>
Expand Down Expand Up @@ -222,9 +222,9 @@
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>d1dd9c2ce3fc0b9358d2cda64c52d052d1a612c1</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.24204.4">
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.24266.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bd9b4590681e602535ed414e98a17e6ba121dca4</Sha>
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21416.5">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand Down
34 changes: 17 additions & 17 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project>
<PropertyGroup>
<!-- The .NET product branding version -->
<ProductVersion>6.0.31</ProductVersion>
<ProductVersion>6.0.32</ProductVersion>
<!-- File version numbers -->
<MajorVersion>6</MajorVersion>
<MinorVersion>0</MinorVersion>
<PatchVersion>31</PatchVersion>
<PatchVersion>32</PatchVersion>
<SdkBandVersion>6.0.400</SdkBandVersion>
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
<PreReleaseVersionIteration>
Expand Down Expand Up @@ -42,21 +42,21 @@
<!-- SDK dependencies -->
<MicrosoftDotNetCompatibilityVersion>1.1.0-preview.22164.17</MicrosoftDotNetCompatibilityVersion>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.24204.4</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.24204.4</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.24204.4</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.24204.4</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.24204.4</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.24204.4</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.24204.4</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.24204.4</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.24204.4</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.24204.4</MicrosoftDotNetPackageTestingVersion>
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.24266.4</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.24266.4</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.24266.4</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.24266.4</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.24266.4</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.24266.4</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.24266.4</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.24266.4</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.24266.4</MicrosoftDotNetPackageTestingVersion>
<!-- NuGet dependencies -->
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
<!-- Installer dependencies -->
Expand Down
6 changes: 3 additions & 3 deletions eng/common/templates-official/job/source-index-stage1.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
runAsPublic: false
sourceIndexPackageVersion: 1.0.1-20210614.1
sourceIndexPackageVersion: 1.0.1-20240320.1
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
preSteps: []
Expand Down Expand Up @@ -32,10 +32,10 @@ jobs:
- ${{ preStep }}

- task: UseDotNet@2
displayName: Use .NET Core sdk 3.1
displayName: Use .NET 8 SDK
inputs:
packageType: sdk
version: 3.1.x
version: 8.0.x
installationPath: $(Agent.TempDirectory)/dotnet
workingDirectory: $(Agent.TempDirectory)

Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates-official/jobs/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
defaultManagedPlatform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'

# Defines the platforms on which to run build jobs. One job is created for each platform, and the
# object in this array is sent to the job template as 'platform'. If no platforms are specified,
Expand Down
6 changes: 3 additions & 3 deletions eng/common/templates/job/source-index-stage1.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
runAsPublic: false
sourceIndexPackageVersion: 1.0.1-20210614.1
sourceIndexPackageVersion: 1.0.1-20240320.1
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
preSteps: []
Expand Down Expand Up @@ -30,10 +30,10 @@ jobs:
- ${{ preStep }}

- task: UseDotNet@2
displayName: Use .NET Core sdk 3.1
displayName: Use .NET 8 SDK
inputs:
packageType: sdk
version: 3.1.x
version: 8.0.x
installationPath: $(Agent.TempDirectory)/dotnet
workingDirectory: $(Agent.TempDirectory)

Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/jobs/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
defaultManagedPlatform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'

# Defines the platforms on which to run build jobs. One job is created for each platform, and the
# object in this array is sent to the job template as 'platform'. If no platforms are specified,
Expand Down
12 changes: 6 additions & 6 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"sdk": {
"version": "6.0.128",
"version": "6.0.130",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "6.0.128"
"dotnet": "6.0.130"
},
"native-tools": {
"cmake": "3.16.4",
"python3": "3.7.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.24204.4",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24204.4",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.24204.4",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.24204.4",
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.24266.4",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24266.4",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.24266.4",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.24266.4",
"Microsoft.Build.NoTargets": "3.1.0",
"Microsoft.Build.Traversal": "3.0.23",
"Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21415.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,18 @@ PAL_X509ContentType AppleCryptoNative_X509GetContentType(uint8_t* pbData, int32_
// The sniffing order is:
// * X509 DER
// * PKCS7 PEM/DER
// * PKCS12 DER (or PEM if Apple has non-standard support for that)
// * X509 PEM or PEM aggregate (or DER, but that already matched)
//
// If the X509 PEM check is done first SecItemImport will erroneously match
// some PKCS#7 blobs and say they were certificates.
//
// Likewise, if the X509 DER check isn't done first, Apple will report it as
// being a PKCS#7.
//
// This does not attempt to open a PFX / PKCS12 as Apple does not provide
// a suitable API to determine if it is PKCS12 without doing potentially
// unbound MAC / KDF work. Instead, let that return Unknown and let the managed
// decoding do the check.
SecCertificateRef certref = SecCertificateCreateWithData(NULL, cfData);

if (certref != NULL)
Expand All @@ -140,41 +144,6 @@ PAL_X509ContentType AppleCryptoNative_X509GetContentType(uint8_t* pbData, int32_
}
}

dataFormat = kSecFormatPKCS12;
actualFormat = dataFormat;
itemType = kSecItemTypeAggregate;
actualType = itemType;

osStatus = SecItemImport(cfData, NULL, &actualFormat, &actualType, 0, NULL, NULL, NULL);

if (osStatus == errSecPassphraseRequired)
{
dataFormat = kSecFormatPKCS12;
actualFormat = dataFormat;
itemType = kSecItemTypeAggregate;
actualType = itemType;

SecItemImportExportKeyParameters importParams;
memset(&importParams, 0, sizeof(SecItemImportExportKeyParameters));

importParams.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION;
importParams.passphrase = CFSTR("");

osStatus = SecItemImport(cfData, NULL, &actualFormat, &actualType, 0, &importParams, NULL, NULL);

CFRelease(importParams.passphrase);
importParams.passphrase = NULL;
}

if (osStatus == noErr || osStatus == errSecPkcs12VerifyFailure)
{
if (actualType == itemType && actualFormat == dataFormat)
{
CFRelease(cfData);
return PAL_Pkcs12;
}
}

dataFormat = kSecFormatX509Cert;
actualFormat = dataFormat;
itemType = kSecItemTypeCertificate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public X509ContentType GetCertContentType(ReadOnlySpan<byte> rawData)

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

// Apple doesn't seem to recognize PFX files with no MAC, so try a quick maybe-it's-a-PFX test
// Apple's native check can't check for PKCS12, so do a quick decode test to see if it is PKCS12 / PFX.
if (contentType == X509ContentType.Unknown)
{
try
Expand All @@ -132,9 +132,11 @@ public X509ContentType GetCertContentType(ReadOnlySpan<byte> rawData)
{
fixed (byte* pin = rawData)
{
AsnValueReader reader = new AsnValueReader(rawData, AsnEncodingRules.BER);

using (var manager = new PointerMemoryManager<byte>(pin, rawData.Length))
{
PfxAsn.Decode(manager.Memory, AsnEncodingRules.BER);
PfxAsn.Decode(ref reader, manager.Memory, out _);
}

contentType = X509ContentType.Pkcs12;
Expand Down
Loading

0 comments on commit 318da1f

Please sign in to comment.