IX509ExtensionKeyUsage::KeyUsage property

The KeyUsage property retrieves the restrictions placed on the public key.

This property is read-only.

Syntax


HRESULT get_KeyUsage(
  [out]  X509KeyUsageFlags *pValue
);

Property value

Pointer to an X509KeyUsageFlags enumeration value that specifies the restrictions.

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.

Remarks

Call the InitializeEncode method or the InitializeDecode method to initialize the collection. You can also call the Critical property to specify and retrieve a Boolean value that identifies whether the extension is critical, and you can call the ObjectId property to retrieve the object identifier (OID) associated with the extension.

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

IX509ExtensionKeyUsage

 

 

Community Additions

ADD
Show:
© 2014 Microsoft