IX509PrivateKey::get_LegacyCsp method

The LegacyCsp property specifies or retrieves a Boolean value that indicates whether the provider is a CryptoAPI (legacy) cryptographic service provider (CSP). This property is web enabled for both input and output.

This property is read/write.

Syntax

HRESULT get_LegacyCsp(
  VARIANT_BOOL *pValue
);

Parameters

pValue

Return Value

None

Remarks

Setting this property automatically sets the following properties to be consistent with the specified LegacyCsp value:

These properties are set in the following manner:
  • If the LegacyCsp property is set to VARIANT_FALSE:
  • If the LegacyCsp property is set to VARIANT_TRUE:
    • The ProviderType is set to XCN_PROV_RSA_FULL if the current value is XCN_PROV_NONE.
    • The KeySpec property is set to XCN_AT_SIGNATURE if the current property is XCN_AT_NONE.
Because a previously specified ProviderName is not affected by setting the LegacyCsp property, setting a LegacyCsp that is inconsistent with the ProviderName property will result in undefined behavior, likely a failure when creating or opening a private key.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See Also

IX509PrivateKey