Re: How do I get RSA public key from X509Certificate ?
From: Allen Owen (alleno@intenda.co.za)
Date: 07/24/02
- Next message: Allen Owen: "Re: CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired"
- Previous message: Allen Owen: "Retrieving and using Server Certificates"
- In reply to: Kishore: "How do I get RSA public key from X509Certificate ?"
- Next in thread: Kishore: "Re: How do I get RSA public key from X509Certificate ?"
- Reply: Kishore: "Re: How do I get RSA public key from X509Certificate ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Allen Owen" <alleno@intenda.co.za> Date: Wed, 24 Jul 2002 09:51:32 +0200
Hi Kishore,
I use {1,0,1} for the exponent, but I can't be 100% sure that it's the
correct way to go about it.
A quick question for you though. Have you tried to retrieve the matching
server certificate for the X509 cert?
I'd imagine that you're getting your a client cert via
Request.ClientCertificate and I need to retreive the matching server cert
and thus far can't see a way to do it :( .
Cheers
Allen
"Kishore" <kishorerc@hotmail.com> wrote in message
news:ePCLqfsMCHA.488@tkmsftngp10...
> Hi Everyone,
> I have a X509Certificate, I want to get a RSA object using the public key
> from the cert. Is this code correct ?
>
> public RSA GetKey(X509Certificate cert)
> {
> RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
> RSAParameters keyInfo = new RSAParameters();
> keyInfo.Exponent = key;
> keyInfo.Modulus = key;
> rSA.ImportParameters(keyInfo);
> return rsa;
> }
>
> Or should I use {1,0,1} for the Exponent ?
> Thanks,
> Kishore
>
>
- Next message: Allen Owen: "Re: CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired"
- Previous message: Allen Owen: "Retrieving and using Server Certificates"
- In reply to: Kishore: "How do I get RSA public key from X509Certificate ?"
- Next in thread: Kishore: "Re: How do I get RSA public key from X509Certificate ?"
- Reply: Kishore: "Re: How do I get RSA public key from X509Certificate ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|