CERT_KEY_ATTRIBUTES_INFO structure (wincrypt.h)

The CERT_KEY_ATTRIBUTES_INFO structure contains optional additional information about the public key being certified. It can include a key identifier, an indication of the intended use of that key, or an indication of the period of use of the corresponding private key.

CryptDecodeObject creates an instance of this structure when performed on a CERT_EXTENSION structure's Value member with its the structure's pszObjId member set to szOID_KEY_ATTRIBUTES.

An instance of this structure can be used as input to CryptEncodeObject to create an appropriate CERT_EXTENSION.

Syntax

typedef struct _CERT_KEY_ATTRIBUTES_INFO {
  CRYPT_DATA_BLOB            KeyId;
  CRYPT_BIT_BLOB             IntendedKeyUsage;
  PCERT_PRIVATE_KEY_VALIDITY pPrivateKeyUsagePeriod;
} CERT_KEY_ATTRIBUTES_INFO, *PCERT_KEY_ATTRIBUTES_INFO;

Members

KeyId

A CRYPT_DATA_BLOB structure with a unique identifier of a key.

IntendedKeyUsage

CRYPT_BIT_BLOB with it pbData member indicating the intended purpose of the key. For a list of usage bit values, see the RestrictedKeyUsage member of the CERT_KEY_USAGE_RESTRICTION_INFO structure.

This member can be used to find the correct key or certificate of a user who has multiple keys or certificates. Its indication of usage is advisory field, only, and does not imply that usage of the key is restricted to the purpose indicated. The list of intended uses is not necessarily all-inclusive, and the field can be omitted. If a key is to be restricted to a particular use a CERT_KEY_USAGE_RESTRICTION_INFO extension must be used.

pPrivateKeyUsagePeriod

A pointer to a CERT_PRIVATE_KEY_VALIDITY structure that indicates the period of use of the private key corresponding to the certified public key. This member is optional and can be set to NULL.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header wincrypt.h

See also

CERT_EXTENSION

CERT_PRIVATE_KEY_VALIDITY

CRYPT_BIT_BLOB

CRYPT_INTEGER_BLOB

CryptDecodeObject