Re: Custom certificate store provider

From: Juan Segarra (juan.segarra_at_alumail.uji.es)
Date: 10/29/04


Date: Fri, 29 Oct 2004 10:29:01 +0200

Register your Store Provider with enconding type 0. Then you'll be able
to open the Store like this:

    hFStore = CertOpenStore("2.10.1.2.3.5.7.11.13.17.19",
      0,
      NULL,
      CERT_SYSTEM_STORE_CURRENT_USER,
      nil );

Innokentiy Ivanov wrote:
> Hello, dear Community.
>
> I am writing my own certificate store provider. I have registered my custom
> provider with CryptRegisterOIDFunction (passing there certain OID, e.g.
> "2.10.1.2.3.5.7.11.13.17.19") and CryptInstallOIDFunctionAddress. It has
> registered properly, but the call to CertOpenStore function always fails and
> GetLastError returns 2 (file not found). I am using CertOpenStore with
> following parameters:
>
> hFStore = CertOpenStore("2.10.1.2.3.5.7.11.13.17.19",
> X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
> 0,
> CERT_SYSTEM_STORE_CURRENT_USER,
> nil );
>
> Am I doing something wrong?
>
> Thank you.
>
> With best regards,
> Innokentiy Ivanov