|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Extract Public Key From certificate and RSACryptoServiceProviderI 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) Show quoteHide quote > 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,
I couldn't find such property in X509Certificate2. Show quoteHide quote "Dominick Baier" <dbaier@pleasepleasenospam_leastprivilege.com> wrote in message news:51eb3048393a8c8e9cafbaf7bd0@news.microsoft.com... > 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. >> >> // 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. >> > > You actually want the Key property of the PublicKey property on the
X509Certificate2 class. -- Show quoteHide quoteJoe Kaplan-MS MVP Directory Services Programming Co-author of "The .NET Developer's Guide to Directory Services Programming" http://www.directoryprogramming.net -- "msnews.microsoft.com" <annonym***@microsoft.com> wrote in message news:ehVDRa7GHHA.4056@TK2MSFTNGP03.phx.gbl... > Hi, > > I couldn't find such property in X509Certificate2. > > "Dominick Baier" <dbaier@pleasepleasenospam_leastprivilege.com> wrote in > message news:51eb3048393a8c8e9cafbaf7bd0@news.microsoft.com... >> 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. >>> >>> // 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. >>> >> >> > >
regarding retrival of server certificate
Permissions on Event Log? Newbie Security Question Is there a limit to number record returned from AD serach to a dat Creating Authorization Manager Store through Code Signing a .NET Application Thread.CurrentPrincipal still returns GenericPrincipal what NewsGroup tools do you use? permission problems TripleDESCryptoServiceProvider - Secret Key Length |
|||||||||||||||||||||||