dotnet / dotnet/dotnet-api-docs

In .NET Framework 4.5.2, X509Certificate2 does implement IDisposable

Open
#817 2 comments 0 reactions 0 assignees View on GitHub
area-System.Security dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

I have code that iterates an array of objects that dispose objects that implement IDisposable. In .net 4.5.2, the certificates do in fact get disposed and all references become invalid. I did not check prior versions. The remarks for this class are wrong/misleading and need to be updated.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 28d79da2-23c7-034a-6edd-5968af41c7fc
* Version Independent ID: 4ad593fd-ef7c-bea2-bd50-7b569554e66d
* Content: [X509Certificate2 Class (System.Security.Cryptography.X509Certificates)](https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2?view=netframework-4.7.1)
* Content Source: [xml/System.Security.Cryptography.X509Certificates/X509Certificate2.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Security.Cryptography.X509Certificates/X509Certificate2.xml)
* Product: **dotnet-api**
* GitHub Login: @mairaw
* Microsoft Alias: **mairaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.