I am using .NET Framework 2.0. I used X509Certificate class to obtain the
public key from a certificate file.
// The path to the certificate.
string Certificate = "C:\\Certificate.cer";
// Load the certificate into an X509Certificate object.
X509Certificate cert = new X509Certificate(Certificate);
byte[] key = cert.GetPublicKey();
My question is how do i use the key to instantiate data to instantiate
RSACryptoServiceProvider. I need this in order to verify a signature
received from a client machine.
Thanks.
Hi,
use the X509Certificate2 class - The public/private Property returns a RSACryptoServiceProvider...
-----
Dominick Baier (http://www.leastprivilege.com)
> I am using .NET Framework 2.0. I used X509Certificate class to obtain
> the public key from a certificate file.
[quoted text clipped - 10 lines]
>
> Thanks.
msnews.microsoft.com - 09 Dec 2006 17:22 GMT
Hi,
I couldn't find such property in X509Certificate2.
> Hi,
> use the X509Certificate2 class - The public/private Property returns a
[quoted text clipped - 17 lines]
>>
>> Thanks.
Joe Kaplan - 09 Dec 2006 22:10 GMT
You actually want the Key property of the PublicKey property on the
X509Certificate2 class.

Signature
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
> Hi,
>
[quoted text clipped - 21 lines]
>>>
>>> Thanks.