Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure contains restrictions imposed on the usage of a certificate's public key. This includes purposes for use of the key and policies under which the key can be used.

The CryptDecodeObjectfunction creates an instance of this structure when performed on a CERT_EXTENSIONstructure's Valuemember with the structure's pszObjIdmember set to szOID_KEY_USAGE_RESTRICTION.

An instance of this structure can be used as input to the CryptEncodeObjectfunction to create an appropriate CERT_EXTENSIONstructure.

Syntax

typedef struct _CERT_KEY_USAGE_RESTRICTION_INFO {
  DWORD 
cCertPolicyId;
  PCERT_POLICY_ID 
rgCertPolicyId;
  CRYPT_BIT_BLOB 
RestrictedKeyUsage;
} CERT_KEY_USAGE_RESTRICTION_INFO,
*PCERT_KEY_USAGE_RESTRICTION_INFO;

Members

cCertPolicyId

Number of elements in the rgCertPolicyIdarray.

rgCertPolicyId

Pointer to an array of CERT_POLICY_IDstructures identifying certification policy identifiers.

RestrictedKeyUsage

CRYPT_BIT_BLOBstructure that includes, as its pbData, a byte indicating the purposes for which the key can be used. If the cbDatamember is zero, the key has no usage restrictions.

The following values are currently defined for the pbDatamember of RestrictedKeyUsage. These values can be combined using a bitwise ORoperation.

  • CERT_DATA_ENCIPHERMENT_KEY_USAGE

  • CERT_DIGITAL_SIGNATURE_KEY_USAGE

  • CERT_KEY_AGREEMENT_KEY_USAGE

  • CERT_KEY_CERT_SIGN_KEY_USAGE

  • CERT_KEY_ENCIPHERMENT_KEY_USAGE

  • CERT_NON_REPUDIATION_KEY_USAGE

  • CERT_OFFLINE_CRL_SIGN_KEY_USAGE

Requirements

Header wincrypt.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also