Skip to content

Conversation

vcsjones
Copy link
Member

Closes #117516

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes the AllowDuplicateAttributes property of the Pkcs12LoaderLimits class public, addressing issue #117516. This change provides users with more granular control over PKCS#12 loading behavior without requiring them to use the DangerousNoLimits setting.

Key changes:

  • Exposed the AllowDuplicateAttributes property as public API
  • Updated test code to use the newly public property instead of relying on DangerousNoLimits
  • Added the property to the reference assembly

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs Added public AllowDuplicateAttributes property to the reference assembly
src/libraries/Common/src/System/Security/Cryptography/X509Certificates/Pkcs12LoaderLimits.cs Changed visibility of AllowDuplicateAttributes property from internal to public
src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/X509CertificateLoaderPkcs12Tests.cs Updated test to use the public property directly instead of conditional logic with DangerousNoLimits
src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/X509CertificateLoaderPkcs12CollectionTests.cs Updated test to use the public property directly instead of conditional logic with DangerousNoLimits

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@vcsjones vcsjones requested a review from bartonjs July 15, 2025 19:02
@vcsjones
Copy link
Member Author

@bartonjs I don't think we can OOB this for < .NET 10. Since the loader limit is a type forward for .NET 9, we can't make it public in the .NET 9 build but have it type forward to in in-box one that is still internal.

@bartonjs
Copy link
Member

Good catch on the OOB.

@vcsjones
Copy link
Member Author

/ba-g Android time out is dotnet/dnceng#5909. The lane was disabled in #117703 but this pull request was in between the known issue and the lane getting disabled.

@vcsjones vcsjones merged commit e8623e7 into dotnet:main Jul 17, 2025
86 of 88 checks passed
@vcsjones vcsjones deleted the pkcs12-allow-dup-attributes branch July 17, 2025 00:07
@vcsjones vcsjones added this to the 10.0.0 milestone Jul 24, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2025
@bartonjs bartonjs added the cryptographic-docs-impact Issues impacting cryptographic docs. Cleared and reused after documentation is updated each release. label Oct 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Security cryptographic-docs-impact Issues impacting cryptographic docs. Cleared and reused after documentation is updated each release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[API Proposal]: Pkcs12LoaderLimits.AllowDuplicateAttributes

2 participants