Don't force-allocate x509ChainPolicy collections in X509Chain.Build (dotnet/corefx...
authorStephen Toub <stoub@microsoft.com>
Sun, 10 Feb 2019 02:26:46 +0000 (21:26 -0500)
committerGitHub <noreply@github.com>
Sun, 10 Feb 2019 02:26:46 +0000 (21:26 -0500)
commit4af9a75dafe2e98dd739304027d894eb3d90c636
treec4cd3479f29683cfae4c54212ed725a1ed976d79
parente8314907d2a49f8575ff94b7e81c9666795bae56
Don't force-allocate x509ChainPolicy collections in X509Chain.Build (dotnet/corefx#35187) (dotnet/corefx#35209)

Previously X509ChainPolicy would always allocate its collections, but now it lazily allocates them.  However, X509Chain.Build is forcing them to be allocated even when they're not needed.  Stop doing that.

Commit migrated from https://github.com/dotnet/corefx/commit/5b8fe73971fb7885fa7afc08ceec28df9a695a23
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Chain.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ChainPolicy.cs