Cannot add Root Certificate with CAPICOM
From: Johannes Verelst (usenet@filter.verelst.net)
Date: 06/28/02
- Next message: art: "msn messenger and window messenger..go secure"
- Previous message: Ian Zuiring: "Re: Is there any "hacker-proof" way ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Johannes Verelst" <usenet@filter.verelst.net> Date: Fri, 28 Jun 2002 21:07:22 +0200
Hi,
According to the MSDN, I can do the following:
===
Minding the Store
Windows stores certificates in Certificate Stores. User certificates are
stored in the "MY" store. Root certificates are stored in the "Root" store.
Intermediate CA certificates are stored in the "CA" store. A developer can
enumerate, add, or remove certificates from a certificate store or examine
certificates in the Active Directory. With CAPICOM it is easy to add your
root certificate to a machine in your enterprise using a simple Visual Basic
Script.
According to this text, I should be able to add a certificate.
Unfortunately, I get an 'Access is Denied' error every time I try to add a
new certificate to the 'Root' store.
===
My code is:
Dim newCert as new Certificate
Dim certStore as new Store
Dim encodedCert as String
encodedCert = "MIIDI ..." (base64 encoded certificate, it's quite long :-)
Call newCert.Import(encodedCert)
Call certStore.Open(CAPICOM_CURRENT_USER_STORE, CAPICOM_ROOT_STORE)
Call certStore.Add(newCert)
The error number I get is '80070005', "Access is denied."
I get that there are security risks concerning the possibility for programs
to add new certificates, but is there any (other) way to do this? According
to the documentation it should be possible, but it apparently isnt.
My environment:
- tested CAPICOM 1.0.0.1 & 2.0
- OS: WIndows XP (could this be the problem? Better security than previous
Windows OS-es?)
- Visual Basic 6.0
Kind regards,
Johannes Verelst
- Next message: art: "msn messenger and window messenger..go secure"
- Previous message: Ian Zuiring: "Re: Is there any "hacker-proof" way ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|