Skip to content

Add note about disposing certificates in chain elements to X509Chain #11042

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

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Mar 3, 2025

Summary

It isn't clear to callers if the certificates in X509Chain.ChainElements need to be independently disposed from the X509Chain itself. So let's add a remark about it to the X509Chain docs.

Closes dotnet/runtime#112987.

@vcsjones vcsjones requested a review from a team as a code owner March 3, 2025 15:26
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-System.Security Issues related to security practices for .NET developers. label Mar 3, 2025
Copy link

Learn Build status updates of commit 1220172:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Security.Cryptography.X509Certificates/X509Chain.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren merged commit b3fa31e into dotnet:main Mar 3, 2025
4 checks passed
@vcsjones vcsjones deleted the dispose-certs-in-chain branch March 3, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security Issues related to security practices for .NET developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: do I need to dispose the X509Certificate2 elements in an X509Chain myself?
3 participants