CspStatus Property

IX509PrivateKey::CspStatus property

The CspStatus property specifies or retrieves an ICspStatus object that contains information about the cryptographic provider and algorithm pair associated with the private key. This property is web enabled for both input and output.

This property is read/write.

Syntax


HRESULT put_CspStatus(
  [in]  ICspStatus *pValue
);

HRESULT get_CspStatus(
  [out] ICspStatus **ppValue
);

Property value

Pointer to an ICspStatus interface.

Error codes

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Name/valueMeaning
CERTSRV_E_PROPERTY_EMPTY

The property value could not be found.

HRESULT_FROM_WIN32(ERROR_FILE_READ_ONLY)

The key is open, and the property value cannot be set.

Remarks

The Algorithm and ProviderName properties are automatically set when you call the CspStatus property. The CspStatus property is typically set during the enrollment process. That is, when a request template specifies multiple provider/algorithm pairs, the enrollment code sets the CspStatus property to the first enabled ICspStatus object and tries to create a private key. If a key cannot be created, the enrollment code sets this property to the next enabled ICspStatus object and tries again.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

DLL

CertEnroll.dll

See also

IX509PrivateKey

 

 

Community Additions

ADD
Show:
© 2016 Microsoft