Share via


Tbsi_Create_Attestation_From_Log function

Creates an attestation by extracting a TrustPoint from a TCG log.

Syntax

NTSTATUS WINAPI Tbsi_Create_Attestation_From_Log(
  _In_      PBYTE   *pbLog,
  _In_      UINT32  cbLog,
  _In_opt_  PWSTR   szAikNameRequested,
  _Out_opt_ PWSTR   *pszAikName,
  _Out_opt_ PBYTE   *pbAikPubDigest,
  _Out_opt_ PBYTE   *pbOutput,
  _In_      UINT32  cbOutput,
  _Out_     PUINT32 *pcbResult,
            UINT32  dwFlags
);

Parameters

  • pbLog [in]
    A pointer to a buffer containing a TCG log.

  • cbLog [in]
    The size in bytes of the log specified by the pbLog parameter.

  • szAikNameRequested [in, optional]
    If there are multiple AIKs registered (for example, using the NCryptExportKey function), this is a pointer to a WCHAR string of the name of the AIK for which to fetch the TrustPoint. If the specified AIK is not found, ERROR_INVALID_PARAMETER is returned. If this optional parameter is NULL, the first TrustPoint (if any) is retrieved from the log.

  • pszAikName [out, optional]
    An optional pointer to a PWSTR variable that receives a pointer to a WCHAR string of the name of the AIK for which the TrustPoint was fetched. If this is NULL, the name is not returned.

  • pbAikPubDigest [out, optional]
    An optional pointer to a 20 byte array to receive the SHA1 hash of the public modulus of the AIK for which the TrustPoint was fetched. If this is NULL, the hash is not returned.

  • pbOutput [out, optional]
    A pointer to the buffer to receive the TrustPoint from the TCG log (if any).

  • cbOutput [in]
    The size in bytes of the buffer at pbOutput.

  • pcbResult [out]
    A pointer to a UINT32 variable to receive the number of bytes written to the buffer, or the size of the buffer required.

  • dwFlags
    No flags defined (0).

Remarks

The first TrustPoint, or the TrustPoint specified by the szAikNameRequested parameter, is extracted from the TCG log passed at the value specified by the pbLog parameter and returned in the buffer passed in the pbOutput parameter. If the pszAikName parameter is specified, it receives a pointer to the name of the AIK for which the TrustPoint is retrieved. If the pbAikPubDigest parameter is specified, it receives the SHA1 hash of the public modulus of the AIK for which the TrustPoint is retrieved.

Requirements

Header

Tbs.h

Library

Tbs.lib

DLL

Tbs.dll

See also

TBS Functions