Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > How to install by program (C#) a certificate from a .p7b file

Thread Tools

How to install by program (C#) a certificate from a .p7b file

Posts: n/a

I must write a certificate installation wizard in c#.
The certificate must be installed in the LocalMachine Certificate Store.

I have done a test version which build the request file (.csr) and correctly
a certificate from a .cer file.

But the C.A. we use send us .p7b files with 2 certificates in it : the CA
and the user certificates.

I tried to import them with an x509Certificate2object.Import(fileName). But
i got an "index not valid" error.
I tried to import them with XENROLLLib.CEnroll methods (InstallPKCS7, ...)
but I got then an "Cannot find requested object" error...

I did'nt find any help on the internet, but i'am new with certificates.
Is there anyway to do it within a C# program ?

Thank's in advance.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Change SSID on the fly - Install certificate silently :| Nelson Guerrero Wireless Networking 1 02-25-2007 06:55 AM
want to create and install private key certificate using openssl Notgiven Computer Security 2 08-02-2006 09:49 PM
Win32::OLE and CAPICOM to find a certificate in certificate store will raise exception Perl Misc 0 07-20-2006 06:47 AM
How to Import Certificate file into windows certificate store under IWAM account Helena Cai ASP General 0 08-29-2004 05:27 AM