TianoCore EDK2 master
|
#include "SpdmSecurityLibInternal.h"
Go to the source code of this file.
Functions | |
UINT32 EFIAPI | GetSpdmDeviceType (IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext) |
UINTN EFIAPI | GetDeviceMeasurementContextSize (IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext) |
EFI_STATUS | CreatePciDeviceMeasurementContext (IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN OUT VOID *DeviceContext, IN UINTN DeviceContextSize) |
EFI_STATUS EFIAPI | CreateDeviceMeasurementContext (IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN OUT VOID *DeviceContext, IN UINTN DeviceContextSize) |
VOID EFIAPI | InternalDumpData (CONST UINT8 *Data, UINTN Size) |
EFI_STATUS | ExtendMeasurement (IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN UINT8 AuthState, IN UINT32 MeasurementRecordLength, IN UINT8 *MeasurementRecord, IN UINT8 *RequesterNonce, IN UINT8 *ResponderNonce, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState) |
EFI_STATUS EFIAPI | DoDeviceMeasurement (IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN UINT8 SlotId, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState) |
EDKII Device Security library for SPDM device. It follows the SPDM Specification.
Copyright (c) 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SpdmMeasurement.c.
EFI_STATUS EFIAPI CreateDeviceMeasurementContext | ( | IN SPDM_DEVICE_CONTEXT * | SpdmDeviceContext, |
IN OUT VOID * | DeviceContext, | ||
IN UINTN | DeviceContextSize | ||
) |
This function creates the SPDM device measurement context for TCG SPDM event.
[in] | SpdmDeviceContext | The SPDM context for the device. |
[in,out] | DeviceContext | The TCG SPDM device measurement context. |
[in] | DeviceContextSize | The size of TCG SPDM device measurement context. |
EFI_SUCCESS | The TCG SPDM device measurement context is returned. |
EFI_UNSUPPORTED | The TCG SPDM device measurement context is unsupported. |
Definition at line 122 of file SpdmMeasurement.c.
EFI_STATUS CreatePciDeviceMeasurementContext | ( | IN SPDM_DEVICE_CONTEXT * | SpdmDeviceContext, |
IN OUT VOID * | DeviceContext, | ||
IN UINTN | DeviceContextSize | ||
) |
This function creates the SPDM PCI device measurement context for TCG SPDM event.
[in] | SpdmDeviceContext | The SPDM context for the device. |
[in,out] | DeviceContext | The TCG SPDM PCI device measurement context. |
[in] | DeviceContextSize | The size of TCG SPDM PCI device measurement context. |
EFI_SUCCESS | The TCG SPDM PCI device measurement context is returned. |
Definition at line 71 of file SpdmMeasurement.c.
EFI_STATUS EFIAPI DoDeviceMeasurement | ( | IN SPDM_DEVICE_CONTEXT * | SpdmDeviceContext, |
IN UINT8 | SlotId, | ||
OUT EDKII_DEVICE_SECURITY_STATE * | SecurityState | ||
) |
This function gets SPDM measurement and extend to TPM.
[in] | SpdmDeviceContext | The SPDM context for the device. |
[in] | SlotId | The number of slot id of the certificate. |
[out] | SecurityState | A poniter to security state of the requester. |
EFI_SUCCESS | Operation completed successfully. |
EFI_OUT_OF_RESOURCES | Out of memory. |
EFI_DEVICE_ERROR | The operation was unsuccessful. |
Definition at line 504 of file SpdmMeasurement.c.
EFI_STATUS ExtendMeasurement | ( | IN SPDM_DEVICE_CONTEXT * | SpdmDeviceContext, |
IN UINT8 | AuthState, | ||
IN UINT32 | MeasurementRecordLength, | ||
IN UINT8 * | MeasurementRecord, | ||
IN UINT8 * | RequesterNonce, | ||
IN UINT8 * | ResponderNonce, | ||
OUT EDKII_DEVICE_SECURITY_STATE * | SecurityState | ||
) |
This function extend the PCI digest from the DvSec register.
[in] | SpdmDeviceContext | The SPDM context for the device. |
[in] | AuthState | The auth state of the device. |
[in] | MeasurementRecordLength | The length of the SPDM measurement record |
[in] | MeasurementRecord | The SPDM measurement record |
[in] | RequesterNonce | A buffer to hold the requester nonce (32 bytes), if not NULL. |
[in] | ResponderNonce | A buffer to hold the responder nonce (32 bytes), if not NULL. |
[out] | SecurityState | The Device Security state associated with the device. |
EFI_SUCCESS | Operation completed successfully. |
EFI_OUT_OF_RESOURCES | Out of memory. |
EFI_DEVICE_ERROR | The operation was unsuccessful. |
Definition at line 177 of file SpdmMeasurement.c.
UINTN EFIAPI GetDeviceMeasurementContextSize | ( | IN SPDM_DEVICE_CONTEXT * | SpdmDeviceContext | ) |
This function returns the SPDM device measurement context size for TCG SPDM event.
[in] | SpdmDeviceContext | The SPDM context for the device. |
Definition at line 45 of file SpdmMeasurement.c.
UINT32 EFIAPI GetSpdmDeviceType | ( | IN SPDM_DEVICE_CONTEXT * | SpdmDeviceContext | ) |
This function returns the SPDM device type for TCG SPDM event.
[in] | SpdmDeviceContext | The SPDM context for the device. |
Definition at line 21 of file SpdmMeasurement.c.
This function dumps data.
[in] | Data | A pointer to Data. |
[in] | Size | The size of Data. |
Definition at line 148 of file SpdmMeasurement.c.