cryptoAPI add a certificate in certificate store

Joined
Jun 6, 2007
Messages
1
Reaction score
0
Hi all,
I want to add a certificate to a certificate store thanks to cryptoAPI

So i get a handle on my certificate context, then i open a certificate store
"My" like this :

hCertStore=CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, NULL,
CERT_SYSTEM_STORE_CURRENT_USER|CERT_STORE_OPEN_EXISTING_FLAG, L"MY");

and then i add my certificate context like this :

CertAddCertificateContextToStore(hCertStore, hCertCtx, CERT_STORE_ADD_NEW,
NULL);

It works successfully but i have a problem : i don't see my certificate in IE or certmgr.msc.
I explain what i have :
- i launch a program that put my certificate in the store and then it enumerates the certificates in that store : my certificate is listed !
- i launch another program that only enumerate certificates in the same store : i don't see my certificate... its seems to be logical in store and not effective

What is the problem ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top