Fix chain cleanup in SslStream.SelectClientCertificate (#72222)
authorStephen Toub <stoub@microsoft.com>
Fri, 15 Jul 2022 02:39:44 +0000 (22:39 -0400)
committerGitHub <noreply@github.com>
Fri, 15 Jul 2022 02:39:44 +0000 (22:39 -0400)
commitd6af9762760a6c6f405c5950d99b55b47f275502
tree35e6cba2b639fa8fd9934bf8a8bd25302d4b9470
parent6d2c35325f675d226f723d7cf74c8dfd796ace57
Fix chain cleanup in SslStream.SelectClientCertificate (#72222)

The chain's elements are being disposed of _after_ the chain itself is being disposed of, which means none of the elements are actually being disposed (chain.Dispose nulls out the collection such that accessing the property again lazily initializes it to an empty one).
src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Protocol.cs