Home All Groups Group Topic Archive Search About

X509 certificate with password

Author
10 Apr 2007 10:10 PM
Filippo Bettinaglio
Hi,

I have a certificate X509 with a private key therefore is protected by
password stored in a file.

I need to read the certificate, with NET2 is a peace of cake:

X509Certificate cert = new X509Certificate(@"...path...", "password");

Done  !!!!

Can someone tell me how it is possible reading the certificate with .NET1.1?
There is no possibility to specify a password, The framework is not so
developed like .NET2

Do I need to go back to APIs?  If so any sample?

I am also happy to install the cert in the machine (and therefore get rid of
the password) and read it from the certificate container? If doing so, I can
stay in a pure .NET 1.1 enviroment without using iterop…..


Many thanks,
Filippo

Author
11 Apr 2007 12:13 AM
Chris Mullins [MVP]
"Filippo Bettinaglio" <FilippoBettinag***@discussions.microsoft.com> wrote:

> Can someone tell me how it is possible reading the certificate with
> .NET1.1?
> There is no possibility to specify a password, The framework is not so
> developed like .NET2

If I remember correctly, you can download the Web Service Extensions (WSE)
1.0 & 2.0 for .Net 1.1.

I'm pretty sure WSE 1.0 & 2.0 are .Net 1.1, but that WSE 3.0 is for .Net
2.0. I could be mistaken though about my versions and how they match up with
..Net 1 & 2. You'll have to check the relevant documentation.

The WSE framework has a signifigant number of classes dedicated to X509
handling and manipulation. One of them should do what you're looking for.
(X509Certificate2, I think. It's been a long time since I did any .Net 1.1
though).

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

AddThis Social Bookmark Button