GenKeyFlags

The GenKeyFlags property value is passed directly to calls made to CryptGenKey. By default it has a value of zero except when a .pvk file is specified using PVKFileName, where it defaults to a value of CRYPT_EXPORTABLE.

By default the private key is not exportable except when a .PVK file is requested. However, if the private key is to be exportable without a specified .pvk file, this flag should be set to CRYPT_EXPORTABLE. If the cryptographic service provider (CSP) does not support exportable private keys, an error occurs.

Data Type

[VB] DWORD
[C++] DWORD

Defined Values

The value for GenKeyFlags is passed through to CryptGenKey. For details, see CryptGenKey in the CryptoAPI documentation.

Affects the behavior of the following methods:

createPKCS10
createFilePKCS10

Access Methods

[VB] "="operator
[C++] HRESULT get_GenKeyFlags (DWORD);
HRESULT put_GenKeyFlags (DWORD);

HRESULT

Value Meaning
S_OK The property read/write completed successfully.