_CRYPTUI_WIZ_IMPORT_SUBJECT_INFO structure

[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.

Value Meaning
CRYPTUI_WIZ_IMPORT_SUBJECT_FILE
Import the certificate stored in the file referenced in the pwszFileName member.
CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT
Import the certificate referenced in the pCertContext member.
CRYPTUI_WIZ_IMPORT_SUBJECT_CTL_CONTEXT
Import the CTL referenced in the pCTLContext member.
CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT
Import the CRL referenced in the pCRLContext member.
CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE
Import the certificate store referenced in the hCertStore member.

__unnamed_union_0173_8

__unnamed_union_0173_8.pwszFileName

__unnamed_union_0173_8.pCertContext

__unnamed_union_0173_8.pCTLContext

__unnamed_union_0173_8.pCRLContext

__unnamed_union_0173_8.hCertStore

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
CRYPT_EXPORTABLE
Imported keys are marked as exportable. If this flag is not used, calls to the CryptExportKey function with the key handle fail.
CRYPT_USER_PROTECTED
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.

CRYPT_MACHINE_KEYSET
The private keys are stored under the local computer and not under the current user.
CRYPT_USER_KEYSET
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

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Header cryptuiapi.h

See Also

CRYPTUI_WIZ_EXPORT_INFO

CryptUIWizExport