Re: Programmatically installing certificates

From: Jeremy Chapman (me_at_here.com)
Date: 09/16/05


Date: Thu, 15 Sep 2005 17:00:50 -0700

Some general stuff to get you started:
Use capicom. If you don't have the dlls, you should be able to find it on
the microsoft site.

It's com, so you'll be able to import it into a .NET wrapper
Create a Capicom.Store object.

To open a store of certificates:
call the Open method of the Capicom.Store object
user = CAPICOM_CURRENT_USER_STORE,
store name = "my"
open mode = CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED |
CAPICOM_STORE_OPEN_EXISTING_ONLY

To list the certificates of an open store:
do a for each on the Certificates property (Collection of certificate
objects) of the object returned from the open method
The certificate object can be inspected by using the GetInfo method on a
Certificate object
parameter = CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME will get its unique name

To import a certificate:
call the Load method of the object returned from the open method
storage type = CAPICOM_KEY_STORAGE_USER_PROTECTED

To remove a certificate
call the Remove method of the object returned from the open method
the remove method expects the subject simple name of the certificate

hope this helps
"Russ" <russk2@eticomm.net> wrote in message
news:c6fji1tscjvce89qropijkn3qkg3822cgd@4ax.com...
> Is there a way to build a program to import certificates into IE - in
> place of using the import wizard? If so, where can I find the
> documentation and samples? For C++ or C# please.
>
> Thank you, Russ



Relevant Pages

  • Re: Programmatically installing certificates
    ... >To list the certificates of an open store: ... >do a for each on the Certificates property (Collection of certificate ... >objects) of the object returned from the open method ... >> Thank you, Russ ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Active Directory Federation Services
    ... that is associated with their profile and the machine itself has a store. ... Just wanted to let you know that I got the cert problem fixed. ... the user certificate store. ... FSP was looking for certs in the local ...
    (microsoft.public.windows.server.active_directory)
  • Re: Accessing certificate store from ASP.NET web project
    ... the cert must be in the local computer/personal) store - it will then open ... Have a look at the source code to open the right cert store... ... One of the locations requires a x509 certificate in order ... different user context than my vb.net web project. ...
    (microsoft.public.dotnet.security)
  • Re: SMS 2003 SP1 Client Install Problem or Policy Retreival Problem?
    ... > Failed to find running shell process ... >> It is possible that the crypto store has somehow been corrupted. ... >>> The MP is setup and thousands of other clients have access. ... >>> Failed to find the certificate in the store, ...
    (microsoft.public.sms.admin)
  • Re: Issues with SSL on Win CE 5.0
    ... the HKCU certificate store. ... and tell the web server to use it. ... The old cert was in. ...
    (microsoft.public.windowsce.embedded)