CRYPTUI_WIZ_IMPORT_SRC_INFO structure (cryptuiapi.h)
[The CRYPTUI_WIZ_IMPORT_SRC_INFO structure is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The CRYPTUI_WIZ_IMPORT_SRC_INFO structure contains the subject to import into the CryptUIWizImport function. The subject can be a certificate, a certificate trust list (CTL), or a certificate revocation list (CRL).
Syntax
typedef struct _CRYPTUI_WIZ_IMPORT_SUBJECT_INFO {
DWORD dwSize;
DWORD dwSubjectChoice;
union {
LPCWSTR pwszFileName;
PCCERT_CONTEXT pCertContext;
PCCTL_CONTEXT pCTLContext;
PCCRL_CONTEXT pCRLContext;
HCERTSTORE hCertStore;
};
DWORD dwFlags;
LPCWSTR pwszPassword;
} CRYPTUI_WIZ_IMPORT_SRC_INFO, *PCRYPTUI_WIZ_IMPORT_SRC_INFO;
Members
dwSize
The size, in bytes, of this structure.
dwSubjectChoice
Indicates the type of subject to import. This member can be one of the following values.
pwszFileName
A pointer to a null-terminated Unicode string that contains the path and file name of the file that contains the certificate to import. This member is used if the dwSubjectChoice member contains CRYPTUI_WIZ_IMPORT_SUBJECT_FILE.
pCertContext
A pointer to the CERT_CONTEXT structure that contains the certificate to import. This member is used if the dwSubjectChoice member contains CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT.
pCTLContext
A pointer to the CTL_CONTEXT structure that contains the CTL to import. This member is used if the dwSubjectChoice member contains CRYPTUI_WIZ_IMPORT_SUBJECT_CTL_CONTEXT.
pCRLContext
A pointer to the CRL_CONTEXT structure that contains the CRL to import. This member is used if the dwSubjectChoice member contains CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT.
hCertStore
A handle to the certificate store to import. This member is used if the dwSubjectChoice member contains CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE.
dwFlags
Contains flags that modify the import operation. This member is required if pwszFileName contains a Personal Information Exchange (PFX) BLOB. Otherwise, this member is ignored. This member can be zero or a combination of one or more of the following values.
Value | Meaning |
---|---|
|
Imported keys are marked as exportable. If this flag is not used, calls to the CryptExportKey function with the key handle fail. |
|
The user is to be notified by means of a dialog box or some other manner when certain actions are attempting to use this key. The precise behavior is specified by the cryptographic service provider (CSP) that is being used.
Prior to Internet Explorer 4.0, Microsoft CSPs ignored this flag. Starting with Internet Explorer 4.0, Microsoft CSPs support this flag. If the provider context was opened with the CRYPT_SILENT flag set, using this flag causes a failure, and the last error is set to NTE_SILENT_CONTEXT. |
|
The private keys are stored under the local computer and not under the current user. |
|
The private keys are stored under the current user and not under the local computer, even if the PFX BLOB specifies that they should go under the local computer. |
pwszPassword
Pointer to a null-terminated Unicode string that contains the password used to access the private key. A password is required if pwszFileName contains a PFX BLOB. If a password is not required, the variable can be an empty string. This member cannot be NULL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | cryptuiapi.h |