EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

CertSetEnhancedKeyUsage function

The CertSetEnhancedKeyUsage function sets the enhanced key usage (EKU) property for the certificate. Use of this function replaces any EKUs associated with the certificate. To add a single EKU usage without changing existing usages, use CertAddEnhancedKeyUsageIdentifier. To delete a single EKU usage, use CertRemoveEnhancedKeyUsageIdentifier.

Syntax


BOOL WINAPI CertSetEnhancedKeyUsage(
  _In_  PCCERT_CONTEXT pCertContext,
  _In_  PCERT_ENHKEY_USAGE pUsage
);

Parameters

pCertContext [in]

A pointer to the CERT_CONTEXT of the specified certificate.

pUsage [in]

Pointer to a CERT_ENHKEY_USAGE structure (equivalent to a CTL_USAGE structure) that contains an array of EKU object identifiers (OIDs) to be set as extended properties of the certificate.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

Library

Crypt32.lib

DLL

Crypt32.dll

See also

Enhanced Key Usage Functions
CertGetEnhancedKeyUsage

 

 

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft