Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CertEnumCertificatesInStore wierd resutls

195 views
Skip to first unread message

Sahil

unread,
Aug 4, 2004, 6:32:16 AM8/4/04
to
Hello,
I am trying to enumerate the certificates in "MY" store. i m having some
strange behaviour of Enumeration API's and objects. There are exactly no
certificates in "My" store and when i try to enumerate the certificate store
using CertEnumCertificatesInStore it returns me 3 certificates which doesn't
exist in "My" store but in the trusted root certificates Store(this store
contains alot of certificates)

CertOpenSystemStore(NULL,"My") this is the syntex i use to open the
certificate store and later i enumerate the same store and it returns me 3
certificates.

I was earlier workign with IStore interface of CAPICOM and it was returning
me a Count of 3. i thought there is some problem of code so i switched to
CAPI but i m having the same results. i empyte'd "My" and "Other People"
store and it still returns me 3 certificates.

any help what can be workaround of it. BTW the certificates it return are CA
certs i looked into their details.

Thanks,
Danish Qamar.

Monica Ene-Pietrosanu[MSFT]

unread,
Aug 10, 2004, 2:09:09 PM8/10/04
to
There are actually more physical locations for MY store, for example one
under Local Machine and other under Current User. WHich one you get depends
on how you open the store. Current User store inherits from Local Machine
(where you probably have 3 certs).

Use CertOpenStore with lpszStoreProvider=CERT_STORE_PROV_SYSTEM and high
word of dwFlags = CERT_SYSTEM_STORE_CURRENT_USER or
CERT_SYSTEM_STORE_LOCAL_MACHINE to get the granularity you need.

I hope this helps,
-----
Monica Ene-Pietrosanu
Windows Security, Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.


"Sahil" <co...@topcoder.com> wrote in message
news:%23hHOR2g...@TK2MSFTNGP09.phx.gbl...

0 new messages