Replies: 2 comments
-
If by "extract" you mean "export", then you can generally pick one arbitrarily. If you mean "use" then you have to pick the one that meets your needs. The certificate's Key Usage can say that the key should only be used for signing, in which case it's ECDSA, or that it should only be used for key agreement, in which case it's ECDH. But if it's flexible, you get to pick. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much Jeremy for the answer and the reference to the function. One more query on top of it. Do we consider the key is ECDH type if it has only Key Agreement key usage or combination of key usage including Key Agreement. |
Beta Was this translation helpful? Give feedback.
-
I have X509Certificate2 object which is constructed from PFX bytes. It can be ECDSA/ECDH key. I would like to extract the key. How can I know whether it is ECDSA/ECDH key and call GetECDsaPrivateKey() or GetECDiffieHellmanPrivateKey().
Beta Was this translation helpful? Give feedback.
All reactions