Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

CERT_STORE_PROV_INFO structure

The CERT_STORE_PROV_INFO structure contains information returned by the installed CertDllOpenStoreProv function when a store is opened by using the CertOpenStore function.

When opening a store, the CertOpenStore function sets all fields in the CERT_STORE_PROV_INFO structure to zero except cbSize, which is set to the size of CERT_STORE_PROV_INFO. The structure is updated by the CertDllOpenStoreProv installable function. If there are no additional callback functions to be called, then cStoreProvFunc remains zero upon return.

Syntax


typedef struct _CERT_STORE_PROV_INFO {
  DWORD             cbSize;
  DWORD             cStoreProvFunc;
  void              **rgpvStoreProvFunc;
  HCERTSTOREPROV    hStoreProv;
  DWORD             dwStoreProvFlags;
  HCRYPTOIDFUNCADDR hStoreProvFuncAddr2;
} CERT_STORE_PROV_INFO, *PCERT_STORE_PROV_INFO;

Members

cbSize

Contains the size, in bytes, of this structure.

cStoreProvFunc

Contains the number of elements in the rgpvStoreProvFunc array. This count must include any NULL values that are used in indexes prior to the last callback function implemented. For example, if only one callback function is implemented, but it is at index 2 (CERT_STORE_PROV_WRITE_CERT_FUNC), with NULL for indexes 0 and 1, then the number 3 should be passed for this parameter.

rgpvStoreProvFunc

An array of pointers to the callback functions that are implemented by the provider. This array is indexed by the values given in the following table, and they must be in the order shown. The associated callback function is shown as well. All callback functions that are not implemented must be set to NULL. The array does not have to contain all callback function indexes, it only needs to contain the highest callback function index implemented. For example, if only the CERT_STORE_PROV_WRITE_CERT_FUNC (2) callback function is implemented, the array only needs to contain three elements.

ValueMeaning
CERT_STORE_PROV_CLOSE_FUNC
0 (0x0)

CertStoreProvCloseCallback

CERT_STORE_PROV_READ_CERT_FUNC
1 (0x1)

CertStoreProvReadCertCallback

CERT_STORE_PROV_WRITE_CERT_FUNC
2 (0x2)

CertStoreProvWriteCertCallback

CERT_STORE_PROV_DELETE_CERT_FUNC
3 (0x3)

CertStoreProvDeleteCertCallback

CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC
4 (0x4)

CertStoreProvSetCertPropertyCallback

CERT_STORE_PROV_READ_CRL_FUNC
5 (0x5)

CertStoreProvReadCRLCallback

CERT_STORE_PROV_WRITE_CRL_FUNC
6 (0x6)

CertStoreProvWriteCRLCallback

CERT_STORE_PROV_DELETE_CRL_FUNC
7 (0x7)

CertStoreProvDeleteCRLCallback

CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC
8 (0x8)

CertStoreProvSetCRLPropertyCallback

CERT_STORE_PROV_READ_CTL_FUNC
9 (0x9)

CertStoreProvReadCTL

CERT_STORE_PROV_WRITE_CTL_FUNC
10 (0xA)

CertStoreProvWriteCTL

CERT_STORE_PROV_DELETE_CTL_FUNC
11 (0xB)

CertStoreProvDeleteCTL

CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC
12 (0xC)

CertStoreProvSetCTLProperty

CERT_STORE_PROV_CONTROL_FUNC
13 (0xD)

CertStoreProvControl

CERT_STORE_PROV_FIND_CERT_FUNC
14 (0xE)

CertStoreProvFindCert

CERT_STORE_PROV_FREE_FIND_CERT_FUNC
15 (0xF)

CertStoreProvFreeFindCert

CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC
16 (0x10)

CertStoreProvGetCertProperty

CERT_STORE_PROV_FIND_CRL_FUNC
17 (0x11)

CertStoreProvFindCRL

CERT_STORE_PROV_FREE_FIND_CRL_FUNC
18 (0x12)

CertStoreProvFreeFindCRL

CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC
19 (0x13)

CertStoreProvGetCRLProperty

CERT_STORE_PROV_FIND_CTL_FUNC
20 (0x14)

CertStoreProvFindCTL

CERT_STORE_PROV_FREE_FIND_CTL_FUNC
21 (0x15)

CertStoreProvFreeFindCTL

CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC
22 (0x16)

CertStoreProvGetCTLProperty

 

hStoreProv

A 32-bit, application-defined value that is the first parameter passed to all callbacks. An application can specify the contents of this member as desired. Typically, this is a pointer to data that is specific to the application, such as provider state information for each store opened.

dwStoreProvFlags

Contains a set of flags that specify how the provider works. Contains zero or a combination of one or more of the following values.

ValueMeaning
CERT_STORE_PROV_EXTERNAL_FLAG
1 (0x1)

The provider stores certificates, certificate revocation lists, and certificate trust lists that are external to the store's cache.

CERT_STORE_PROV_DELETED_FLAG
2 (0x2)

The store was successfully deleted. The CertStoreProvCloseCallback callback is not called.

CERT_STORE_PROV_NO_PERSIST_FLAG
4 (0x4)

By default, the provider will persist changes that are made to the store. If this flag is set, the provider does not persist the changes made to the store.

CERT_STORE_PROV_SYSTEM_STORE_FLAG
8 (0x8)

The provider persists contexts to a system store.

CERT_STORE_PROV_LM_SYSTEM_STORE_FLAG
16 (0x10)

The provider persists contexts to a LocalMachine system store.

 

hStoreProvFuncAddr2

Contains the handle returned by CryptGetOIDFunctionAddress. CertCloseStore calls CryptFreeOIDFunctionAddress to free a non-null hStoreProvFuncAddr2. This allows the callback to call one other installable function that will be freed when the store is closed.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.