Skip to content

Latest commit

 

History

History
144 lines (111 loc) · 9.53 KB

nf-certenroll-ix509certificaterequestpkcs10-get_cspstatuses.md

File metadata and controls

144 lines (111 loc) · 9.53 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:certenroll.IX509CertificateRequestPkcs10.get_CspStatuses
IX509CertificateRequestPkcs10::get_CspStatuses (certenroll.h)
Retrieves a collection of ICspStatus objects that matches the intended use of the private key associated with the certificate request.
CspStatuses property [Security]
CspStatuses property [Security]
IX509CertificateRequestPkcs10 interface
IX509CertificateRequestPkcs10 interface [Security]
CspStatuses property
IX509CertificateRequestPkcs10.CspStatuses
IX509CertificateRequestPkcs10.get_CspStatuses
IX509CertificateRequestPkcs10::CspStatuses
IX509CertificateRequestPkcs10::get_CspStatuses
certenroll/IX509CertificateRequestPkcs10::CspStatuses
certenroll/IX509CertificateRequestPkcs10::get_CspStatuses
get_CspStatuses
security.ix509certificaterequestpkcs10_cspstatuses_property
security\ix509certificaterequestpkcs10_cspstatuses_property.htm
security
cad6d8f0-f7d6-4ede-96a2-b00159962a1b
12/05/2018
CspStatuses property [Security], CspStatuses property [Security],IX509CertificateRequestPkcs10 interface, IX509CertificateRequestPkcs10 interface [Security],CspStatuses property, IX509CertificateRequestPkcs10.CspStatuses, IX509CertificateRequestPkcs10.get_CspStatuses, IX509CertificateRequestPkcs10::CspStatuses, IX509CertificateRequestPkcs10::get_CspStatuses, certenroll/IX509CertificateRequestPkcs10::CspStatuses, certenroll/IX509CertificateRequestPkcs10::get_CspStatuses, get_CspStatuses, security.ix509certificaterequestpkcs10_cspstatuses_property
certenroll.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CertEnroll.dll
Windows
19H1
IX509CertificateRequestPkcs10::get_CspStatuses
certenroll/IX509CertificateRequestPkcs10::get_CspStatuses
c++
APIRef
kbSyntax
COM
CertEnroll.dll
IX509CertificateRequestPkcs10.CspStatuses
IX509CertificateRequestPkcs10.get_CspStatuses

IX509CertificateRequestPkcs10::get_CspStatuses

-description

The CspStatuses property retrieves a collection of ICspStatus objects that matches the intended use of the private key associated with the certificate request.

This property is read-only.

-parameters

-remarks

This property retrieves a collection of ICspStatus objects. Each object represents a single provider/algorithm pair. The CspStatuses property differs from the GetCspStatuses method. The method enables you to set a KeySpec parameter, but CspStatuses uses the KeySpec property set on the private key associated with the IX509CertificateRequestPkcs10 object. This can be one of the following values.

Value Description
XCN_AT_NONE Only Cryptography API: Next Generation (CNG) providers are selected.
XCN_AT_KEYEXCHANGE Only CryptoAPI cryptographic service providers (CSPs) with encryption algorithms (including key exchange) are selected.
XCN_AT_SIGNATURE Only CryptoAPI cryptographic service providers (CSPs) with signature algorithms are selected.
 

If you specify a template when initializing the request object, template attributes such as the pKIDefaultCSPs and pKIDefaultKeySpec affect which provider/algorithm pairs are initially enabled in the collection. You can call the following properties on each ICspStatus object to retrieve information about a pair:

  • The CspInformation property retrieves provider information.
  • The CspAlgorithm property retrieves algorithm information.
  • The EnrollmentStatus property retrieves an IX509EnrollmentStatus object. Call the Selected property on the status object to determine whether the provider/algorithm pair is enabled for this request.
  • The Ordinal property retrieves the position in the collection of the provider/algorithm pair.

The collection retrieved by this method is saved internally on the request object. The collection exists as long as the PKCS #10 object continues to exist.

Assume, for example, that the KeySpec property on the private key associated with the request object is set to XCN_AT_SIGNATURE and that a template is used to initialize the request. The following statements will be true:

  • A collection of ICspStatus objects is created and saved on the IX509CertificateRequestPkcs10 object. The collection contains all valid provider/algorithm pairs installed on the computer.
  • Because the KeySpec property is not set to XCN_AT_NONE, the Selected property is set to SelectedNo for each Cryptography API: Next Generation (CNG) provider/algorithm pair in the collection.
  • Because the KeySpec property is not set to XCN_AT_KEYEXCHANGE, the Selected property is set to SelectedNo for each CryptoAPI CSP/algorithm pair in the collection where the algorithm can be used only to encrypt data or archive a key.
  • For each provider referenced by the template or private key but not supported on the computer, a placeholder ICspStatus object is created and added to the collection and the Selected property is set to SelectedNo.
  • The Selected property is set to SelectedYes for each CryptoAPI CSP/algorithm pair where the algorithm can be used only to sign data.
  • The Ordinal property is set to reflect the CSP order, if any, identified by the pKIDefaultCSPs template attribute. The CSPs listed first by the attribute are ordered first in the collection. This property is used during enrollment if a private key must be created. The first selected CSP/algorithm pair is used to create the key, but if the operation fails, the next selected pair is tried.

You must initialize the IX509CertificateRequestPkcs10 object before calling this method. For more information, see any of the following methods:

-see-also

ICspAlgorithm

ICspAlgorithms

ICspInformation

ICspInformations

ICspStatus

IX509CertificateRequestPkcs10