IX509ExtensionKeyUsage interface

The IX509ExtensionKeyUsage interface can be used to define restrictions on the operations that can be performed by the public key contained in the certificate. This is the same purpose as that served by the EnhancedKeyUsage extension, but KeyUsage predates that extension and defines a more limited set of restrictions. The following syntax shows the Abstract Syntax Notation One (ASN.1) structure of the extension. The extension value is encoded by using Distinguished Encoding Rules (DER) and included in the certificate request.


----------------------------------------------------------------------
-- KeyUsage
-- XCN_OID_KEY_USAGE (2.5.29.15)
----------------------------------------------------------------------

KeyUsageExtension ::= Bits

The possible restrictions are defined by using a bitwise-OR combination of the values in the X509KeyUsageFlags enumeration.

To add this extension object to a PKCS #10 request or a CMC request, you must first add it to an IX509Extensions collection and use the collection to initialize an IX509AttributeExtensions object. For more information, see the PKCS #10 Extensions and the CMC Extensions topics.

Members

The IX509ExtensionKeyUsage interface inherits from IX509Extension. IX509ExtensionKeyUsage also has these types of members:

Methods

The IX509ExtensionKeyUsage interface has these methods.

MethodDescription
InitializeDecode

Initializes the extension from a DER-encoded byte array that contains the extension value.

InitializeEncode

Initializes the extension by using the X509KeyUsageFlags enumeration.

[WebEnabled]

 

Properties

The IX509ExtensionKeyUsage interface has these properties.

PropertyDescription

KeyUsage

Retrieves the restrictions placed on the public key.

 

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

Certificate Enrollment API
IX509Extension

 

 

Community Additions

ADD
Show:
© 2014 Microsoft