Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit trailing data after PKCS12 on iOS #88340

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ private static bool IsPkcs12(ReadOnlySpan<byte> rawData)
{
using (var manager = new PointerMemoryManager<byte>(pin, rawData.Length))
{
PfxAsn.Decode(manager.Memory, AsnEncodingRules.BER);
// Permit trailing data after the PKCS12.
AsnValueReader reader = new AsnValueReader(rawData, AsnEncodingRules.BER);
PfxAsn.Decode(ref reader, manager.Memory, out _);
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public void ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassw
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/88050", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void Import_BlobHasMoreThanOnePfx_LoadsOnlyOne()
{
// These certs don't use PBES2 so they should be supported everywhere.
Expand Down
Loading