IEnroll::put_GenKeyFlags method (xenroll.h)
[This property is no longer available for use as of Windows Server 2008 and Windows Vista.]
The GenKeyFlags property sets or retrieves the values passed to CryptGenKey when the certificate request is generated.
By default, the GenKeyFlags property is set to zero. However, when a .pvk file is specified, the value of GenKeyFlags defaults to CRYPT_EXPORTABLE. For more information, see Remarks.
This property was first defined in the IEnroll interface.
This property is read/write.
Syntax
HRESULT put_GenKeyFlags(
LONG dwFlags
);
Parameters
dwFlags
Return value
None
Remarks
By default, private keys are not exportable unless a .pvk file is requested. To make the private key exportable without specifying a .pvk file, set GenKeyFlags to CRYPT_EXPORTABLE.
To specify a .pvk file name, use the PVKFileNameWStr property.
The GenKeyFlags property value is passed to the CryptGenKey CryptoAPI function by using its dwFlags parameter.
If the cryptographic service provider (CSP) does not support exportable private keys, an error occurs.
The GenKeyFlags property affects the behavior of the following methods:
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | xenroll.h |
Library | Uuid.lib |
DLL | Xenroll.dll |