Problem with X509 certificate parameters

  • Thread starter Thread starter Marco Moioli
  • Start date Start date
M

Marco Moioli

Hi everybody:

I want to import the private key of my 1st certificate contained in my
Certification store.
I create the certificate with the private key exportable, but if I run the
code below, I obtain "Export of private parameters is not supported"

static void Main(string[] args)

{

X509CertificateStore store = X509CertificateStore.CurrentUserStore(
X509CertificateStore.MyStore );

store.OpenRead();

X509Certificate first_cert = (X509Certificate)store.Certificates[0];

RSAParameters first_cert_key = first_cert.Key.ExportParameters(true);


RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();

rsa.ImportParameters(first_cert_key);

}

Thanks in advance,

Marco
 
Marco

Could you kindly update me when you kind a solution. I get the same error!

Shall post the solution should I find one.

Sreedhar
 
Back
Top