CERT_PHYSICAL_STORE_INFO structure (wincrypt.h)
The CERT_PHYSICAL_STORE_INFO structure contains information on physical certificate stores. Some members of these structures are passed directly to system calls of CertOpenStore to open the physical store.
Syntax
typedef struct _CERT_PHYSICAL_STORE_INFO {
DWORD cbSize;
LPSTR pszOpenStoreProvider;
DWORD dwOpenEncodingType;
DWORD dwOpenFlags;
CRYPT_DATA_BLOB OpenParameters;
DWORD dwFlags;
DWORD dwPriority;
} CERT_PHYSICAL_STORE_INFO, *PCERT_PHYSICAL_STORE_INFO;
Members
cbSize
The size, in bytes, of this structure.
pszOpenStoreProvider
A pointer to a string that names a certificate store provider type. This string is passed in a system call to CertOpenStore and determines the provider type of a certificate store to be opened. For the names of predefined certificate store types, see CertOpenStore.
In addition to predefined certificate store provider types, new store provider types can be installed and registered with CryptInstallOIDFunctionAddress or CryptRegisterOIDFunction. For more information, see CertOpenStore.
dwOpenEncodingType
This member is applicable only when CERT_STORE_PROV_MSG, CERT_STORE_PROV_PKCS7, or CERT_STORE_PROV_FILENAME is passed in lpszStoreProvider. Otherwise, this member is not used.
It is always acceptable to specify both the certificate and message encoding types by combining them with a bitwise-OR operation as shown in the following example:
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING Currently defined encoding types are:
- X509_ASN_ENCODING
- PKCS_7_ASN_ENCODING
dwOpenFlags
If a system store is opened with the SERVICES or USERS store location, the dwOpenFlags store location is set to CERT_SYSTEM_STORE_USERS or CERT_SYSTEM_STORE_SERVICES.
OpenParameters
A CRYPT_DATA_BLOB that contains data to be passed to the pvPara parameter of the CertOpenStore function. The data type depends on the provider specified. For detailed information about the type and content to be passed, see descriptions of available providers in CertOpenStore.
dwFlags
The following dwFlags values for CERT_PHYSICAL_STORE_INFO are defined.
Value | Meaning |
---|---|
|
Enables addition to a context to the store. |
|
Set by the CertRegisterPhysicalStore function. By default, all system stores located in the registry have an implicit SystemRegistry physical store that is opened. To disable the opening of this store, the SystemRegistry physical store that corresponds to the System store must be registered by setting CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG or by registering a physical store named ".Default" with CertRegisterPhysicalStore. |
|
Disables remote opening of the physical store. |
|
Places the string \\ComputerName in front of other provider types. |
|
Enables CertOpenStore to open a store relative to a user-specified HKEY instead of one of the predefined HKEY constants. For example, HKEY_CURRENT_USER can be replaced with a user-specified HKEY. When CERT_SYSTEM_STORE_RELOCATE_FLAG is set, the pvPara parameter passed to CertOpenStore points to a CERT_SYSTEM_STORE_RELOCATE_PARA structure instead of pointing to the store name as a null-terminated Unicode or ASCII string. |
dwPriority
When a system store is opened, its physical stores are ordered according to their dwPriority settings. A higher dwPriority indicates higher priority. The dwPriority member is passed to CertAddStoreToCollection.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | wincrypt.h |