473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with X509 certificate parameters

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
Nov 16 '05 #1
1 4581
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

"Marco Moioli" <v-******@microsoft.com> wrote in message news:<#e**************@TK2MSFTNGP09.phx.gbl>...
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

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gustavo Quinteros | last post by:
I'm trying to sign a XML with a X509 Certificate (Like an email), and store it in a database. I want to include the certificate in the XML in order to display the certificate properties (like...
6
by: Mattia Saccotelli | last post by:
Hi I would like to encrypt data using AES (Rijndael) algorithm, providing as the key the key from a given certificate. Just for testing I'm using the public key.. Shouldn't I use the private...
0
by: sushant.bhatia | last post by:
Hi. I'm trying to verify a X509 Certificate. In order to do this, I need to get the public key, Hash & Signature stored in a X509 certificate. I am able to get the Public Key & then the...
0
by: Koan B | last post by:
(Cross-posted to dotnet.framework.aspnet.webservices and dotnet.framework.webservices, follow-ups set to dotnet.framework.aspnet.webservices) Hi, I'm attempting to connect to a 3rd party web...
1
by: KlassifiedBBS | last post by:
Does anyone know if there is any sample code to create a x509 certificate out there - I'll buy a book if it has the code in it. I have spent a couple of days digging around in the...
1
by: | last post by:
Hi, I'd like to store X509 cetificates in a central location (file server, database, etc), and load them when needed, is it practical ? and in term of implementation, can this be achieved by...
2
by: David G | last post by:
My company has a Webservice that is currently running in production. It is secured using SSL and clients are authenticated using X509 certificates. I am able to consume the Webservice methods in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.