Correct fallback logic for ECDiffieHellmanCng with other ECDHPublicKey types
authorKevin Jones <kevin@vcsjones.com>
Thu, 10 Sep 2020 22:31:28 +0000 (18:31 -0400)
committerGitHub <noreply@github.com>
Thu, 10 Sep 2020 22:31:28 +0000 (15:31 -0700)
commit05455df49db9e8b73ce20c995f4372c0adc11f3e
treeab8d7472faf85aa07ab67935a0846ed32cede202
parente0df256a4458364937e524aeee3f525c71330e0c
Correct fallback logic for ECDiffieHellmanCng with other ECDHPublicKey types

Use the concrete ECDiffieHellmanCng type (which is the internal type in Algorithms and the public type in Cng) instead of calling Create (which always returns the internal type).
src/libraries/System.Security.Cryptography.Cng/src/System/Security/Cryptography/ECDiffieHellmanCng.Derive.cs
src/libraries/System.Security.Cryptography.Cng/tests/ECDiffieHellmanCngTests.cs