Expand Minimize

CERT_KEY_CONTEXT structure

The CERT_KEY_CONTEXT structure contains data associated with a CERT_KEY_CONTEXT_PROP_ID property.

Syntax


typedef struct _CERT_KEY_CONTEXT {
  DWORD cbSize;
  union {
    HCRYPTPROV        hCryptProv;
    NCRYPT_KEY_HANDLE hNCryptKey;
  };
  DWORD dwKeySpec;
} CERT_KEY_CONTEXT, *PCERT_KEY_CONTEXT;

Members

cbSize

The size, in bytes, of this structure.

hCryptProv

A cryptographic service provider (CSP) handle. This member is used when the dwKeySpec member contains AT_KEYEXCHANGE or AT_SIGNATURE.

hNCryptKey

A CNG CSP handle. This member is used when the dwKeySpec member contains CERT_NCRYPT_KEY_SPEC.

Windows Server 2003 and Windows XP:  This member is not available.

dwKeySpec

The specification of the private key to retrieve.

The following dwKeySpec values are defined for the default provider.

ValueMeaning
AT_KEYEXCHANGE

Keys used to encrypt/decrypt session keys. The handle to the CSP is contained in the hCryptProv member.

AT_SIGNATURE

Keys used to create and verify digital signatures. The handle to the CSP is contained in the hCryptProv member.

CERT_NCRYPT_KEY_SPEC

Keys associated with a CNG CSP. The handle to the CNG CSP is set in the hNCryptProv member.

Windows Server 2003 and Windows XP:  This value is not used.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

See also

CertGetCertificateContextProperty
CertSetCertificateContextProperty
CERT_EXTENSION

 

 

Community Additions

ADD
Show:
© 2014 Microsoft