Remove SafeX509Handle finalizations coming out of the test project
authorJeremy Barton <jbarton@microsoft.com>
Fri, 17 Jun 2016 16:49:47 +0000 (09:49 -0700)
committerJeremy Barton <jbarton@microsoft.com>
Fri, 17 Jun 2016 17:35:14 +0000 (10:35 -0700)
commit6cbb5d491db7937031e0f33a9581ef49c05b3e5a
tree715a3cce51293a18fb11628a6abb6c5676dab4ad
parentb0875da85374d0bd62799880db8c41b9ed8bbef6
Remove SafeX509Handle finalizations coming out of the test project

There are a few classes of problems here
* X509Chain's X509ChainElements have (newly created) X509Certificate2s on them, no one called Dispose.
* Not Disposing the returned results from calls to Find.
* Touching X509Store.Certificates in passing.
    * MachineRootStore_NonEmpty asked for the Count of the root store, sending that number of handles to be Finalized

Commit migrated from https://github.com/dotnet/corefx/commit/67d802cebe2ca7ce6c5668907f382823758ad8f5
src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainHolder.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/ExtensionsTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/FindTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj
src/libraries/System.Security.Cryptography.X509Certificates/tests/X509FilesystemTests.Unix.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs