-
Notifications
You must be signed in to change notification settings - Fork 874
SslStream RemoteCertificate disposal #5993
Copy link
Copy link
Milestone
Description
The issue
Once the certificate has been accessed on an SslStream it will no longer dispose it when the stream is disposed. A bit of a hidden requirement is that the caller takes that responsibility once it is no longer needed.
https://learn.microsoft.com/en-us/dotnet/api/system.net.security.sslstream.remotecertificate?view=net-9.0#remarks
Not sure if this causes any actual issues. Just noticed it in the code.
It also likely (always?) returns a X509Certificate2 instance so there may be no need to create a new one on line 199.
Reactions are currently unavailable