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.
The value for GenKeyFlags is passed through to CryptGenKey. For details, see CryptGenKey in the CryptoAPI documentation.
Value | Meaning |
---|---|
S_OK | The property read/write completed successfully. |