10#ifndef SPDM_SECURITY_LIB_INTERNAL_H_
11#define SPDM_SECURITY_LIB_INTERNAL_H_
16#include <industry_standard/spdm.h>
17#include <industry_standard/spdm_secured_message.h>
32#include <library/spdm_requester_lib.h>
39#include "library/spdm_crypt_lib.h"
41#define SPDM_DEVICE_CONTEXT_SIGNATURE SIGNATURE_32 ('S', 'P', 'D', 'C')
47 BOOLEAN IsEmbeddedDevice;
52 UINTN SpdmContextSize;
54 UINTN ScratchBufferSize;
59 UINTN SignatureListSize;
68#define SPDM_DEVICE_CONTEXT_INSTANCE_SIGNATURE SIGNATURE_32 ('S', 'D', 'C', 'S')
69#define SPDM_DEVICE_CONTEXT_INSTANCE_FROM_LINK(a) CR (a, SPDM_DEVICE_CONTEXT_INSTANCE, Link, SPDM_DEVICE_CONTEXT_INSTANCE_SIGNATURE)
140 IN OUT VOID *DeviceContext,
168 IN VOID *TrustAnchor,
206 OUT UINT8 *AuthState,
207 OUT UINT8 *ValidSlotId,
209 OUT BOOLEAN *IsValidCertChain,
210 OUT BOOLEAN *RootCertMatch
230 OUT UINT8 *AuthState,
231 IN UINT8 ValidSlotId,
232 IN BOOLEAN IsValidCertChain,
233 IN BOOLEAN RootCertMatch,
VOID *EFIAPI GetSpdmIoProtocolViaSpdmContext(IN VOID *SpdmContext)
SPDM_DEVICE_CONTEXT *EFIAPI CreateSpdmDeviceContext(IN EDKII_SPDM_DEVICE_INFO *SpdmDeviceInfo, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState)
VOID EFIAPI InternalDumpData(CONST UINT8 *Data, UINTN Size)
EFI_STATUS EFIAPI DoDeviceCertificate(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, OUT UINT8 *AuthState, OUT UINT8 *ValidSlotId, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState, OUT BOOLEAN *IsValidCertChain, OUT BOOLEAN *RootCertMatch)
EFI_STATUS EFIAPI CreateDeviceMeasurementContext(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN OUT VOID *DeviceContext, IN UINTN DeviceContextSize)
EFI_STATUS ExtendCertificate(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN UINT8 AuthState, IN UINTN CertChainSize, IN UINT8 *CertChain, IN VOID *TrustAnchor, IN UINTN TrustAnchorSize, IN UINT8 SlotId, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState)
EFI_STATUS EFIAPI DoDeviceMeasurement(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, IN UINT8 SlotId, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState)
UINT32 EFIAPI GetSpdmDeviceType(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext)
EFI_STATUS EFIAPI DoDeviceAuthentication(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext, OUT UINT8 *AuthState, IN UINT8 ValidSlotId, IN BOOLEAN IsValidCertChain, IN BOOLEAN RootCertMatch, OUT EDKII_DEVICE_SECURITY_STATE *SecurityState)
VOID EFIAPI DestroySpdmDeviceContext(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext)
UINTN EFIAPI GetDeviceMeasurementContextSize(IN SPDM_DEVICE_CONTEXT *SpdmDeviceContext)