mirror of
https://github.com/stefanberger/libtpms
synced 2025-08-26 13:14:36 +00:00
Compare commits
6 Commits
708f2a8bc9
...
80c3352bc7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
80c3352bc7 | ||
![]() |
d3e9240e84 | ||
![]() |
7b37afc1d2 | ||
![]() |
bc565b962f | ||
![]() |
e28feca41f | ||
![]() |
e5d27e9011 |
@ -5059,41 +5059,6 @@ SetCapability_COMMAND_DESCRIPTOR_t _SetCapabilityData = {
|
|||||||
#define _SetCapabilityDataAddress 0
|
#define _SetCapabilityDataAddress 0
|
||||||
#endif // CC_SetCapability
|
#endif // CC_SetCapability
|
||||||
|
|
||||||
#if CC_AC_GetCapability
|
|
||||||
#include "AC_GetCapability_fp.h"
|
|
||||||
typedef TPM_RC (AC_GetCapability_Entry)(
|
|
||||||
AC_GetCapability_In *in,
|
|
||||||
AC_GetCapability_Out *out
|
|
||||||
);
|
|
||||||
typedef const struct {
|
|
||||||
AC_GetCapability_Entry *entry;
|
|
||||||
UINT16 inSize;
|
|
||||||
UINT16 outSize;
|
|
||||||
UINT16 offsetOfTypes;
|
|
||||||
UINT16 paramOffsets[3];
|
|
||||||
BYTE types[7];
|
|
||||||
} AC_GetCapability_COMMAND_DESCRIPTOR_t;
|
|
||||||
AC_GetCapability_COMMAND_DESCRIPTOR_t _AC_GetCapabilityData = {
|
|
||||||
/* entry */ &TPM2_AC_GetCapability,
|
|
||||||
/* inSize */ (UINT16)(sizeof(AC_GetCapability_In)),
|
|
||||||
/* outSize */ (UINT16)(sizeof(AC_GetCapability_Out)),
|
|
||||||
/* offsetOfTypes */ offsetof(AC_GetCapability_COMMAND_DESCRIPTOR_t, types),
|
|
||||||
/* offsets */ {(UINT16)(offsetof(AC_GetCapability_In, capability)),
|
|
||||||
(UINT16)(offsetof(AC_GetCapability_In, count)),
|
|
||||||
(UINT16)(offsetof(AC_GetCapability_Out, capabilitiesData))},
|
|
||||||
/* types */ {TPMI_RH_AC_H_UNMARSHAL,
|
|
||||||
TPM_AT_P_UNMARSHAL,
|
|
||||||
UINT32_P_UNMARSHAL,
|
|
||||||
END_OF_LIST,
|
|
||||||
TPMI_YES_NO_P_MARSHAL,
|
|
||||||
TPML_AC_CAPABILITIES_P_MARSHAL,
|
|
||||||
END_OF_LIST}
|
|
||||||
};
|
|
||||||
#define _AC_GetCapabilityDataAddress (&_AC_GetCapabilityData)
|
|
||||||
#else
|
|
||||||
#define _AC_GetCapabilityDataAddress 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CC_AC_Send
|
#if CC_AC_Send
|
||||||
#include "AC_Send_fp.h"
|
#include "AC_Send_fp.h"
|
||||||
|
|
||||||
@ -5618,7 +5583,7 @@ COMMAND_DESCRIPTOR_t* s_CommandDataArray[] = {
|
|||||||
(COMMAND_DESCRIPTOR_t*)_EncryptDecrypt2DataAddress,
|
(COMMAND_DESCRIPTOR_t*)_EncryptDecrypt2DataAddress,
|
||||||
#endif // CC_EncryptDecrypt2
|
#endif // CC_EncryptDecrypt2
|
||||||
#if (PAD_LIST || CC_AC_GetCapability)
|
#if (PAD_LIST || CC_AC_GetCapability)
|
||||||
(COMMAND_DESCRIPTOR_t*)_AC_GetCapabilityDataAddress,
|
(COMMAND_DESCRIPTOR_t*)_GetCapabilityDataAddress,
|
||||||
#endif // CC_AC_GetCapability
|
#endif // CC_AC_GetCapability
|
||||||
#if (PAD_LIST || CC_AC_Send)
|
#if (PAD_LIST || CC_AC_Send)
|
||||||
(COMMAND_DESCRIPTOR_t*)_AC_SendDataAddress,
|
(COMMAND_DESCRIPTOR_t*)_AC_SendDataAddress,
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
//* Includes and Typedefs
|
//* Includes and Typedefs
|
||||||
#include "Tpm.h"
|
#include "Tpm.h"
|
||||||
#include "Marshal.h"
|
#include "Marshal.h"
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
//** Description
|
//** Description
|
||||||
|
|
||||||
// This file contains internal global type definitions and data declarations that
|
// This file contains internal global type definitions and data declarations that
|
||||||
|
@ -154,9 +154,7 @@ TPM2B_EMPTY c_SHA3_384_digest = {{0, {0}}};
|
|||||||
TPM2B_EMPTY c_SHA3_512_digest = {{0, {0}}};
|
TPM2B_EMPTY c_SHA3_512_digest = {{0, {0}}};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SMAC_IMPLEMENTED && ALG_CMAC // libtpms added begin
|
||||||
// libtpms added begin
|
|
||||||
#if SMAC_IMPLEMENTED && ALG_CMAC
|
|
||||||
TPM2B_TYPE(AES128, 16);
|
TPM2B_TYPE(AES128, 16);
|
||||||
static TPM2B_AES128 cmac_aeskey = {{16, {
|
static TPM2B_AES128 cmac_aeskey = {{16, {
|
||||||
0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
|
0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
|
||||||
@ -213,6 +211,5 @@ static const struct CMACTest {
|
|||||||
.key = NULL,
|
.key = NULL,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif // libtpms added end
|
||||||
// libtpms added end
|
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _MANUFACTURE_FP_H_
|
#ifndef _MANUFACTURE_FP_H_
|
||||||
#define _MANUFACTURE_FP_H_
|
#define _MANUFACTURE_FP_H_
|
||||||
|
|
||||||
|
@ -333,46 +333,3 @@ bool _rpc__Signal_IsPowerOn(void)
|
|||||||
}
|
}
|
||||||
/* libtpms added end */
|
/* libtpms added end */
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* D.4 TPMCmdp.c */
|
|
||||||
/* D.4.1. Description */
|
|
||||||
/* This file contains the functions that process the commands received on the control port or the
|
|
||||||
command port of the simulator. The control port is used to allow simulation of hardware events
|
|
||||||
(such as, _TPM_Hash_Start()) to test the simulated TPM's reaction to those events. This improves
|
|
||||||
code coverage of the testing. */
|
|
||||||
/* D.4.2. Includes and Data Definitions */
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <setjmp.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "TpmBuildSwitches.h"
|
|
||||||
#ifdef TPM_WINDOWS
|
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
//#include "Platform_fp.h"
|
|
||||||
#include "PlatformACT_fp.h"
|
|
||||||
#include "ExecCommand_fp.h"
|
|
||||||
#include "Manufacture_fp.h"
|
|
||||||
#include "_TPM_Init_fp.h"
|
|
||||||
#include "_TPM_Hash_Start_fp.h"
|
|
||||||
#include "_TPM_Hash_Data_fp.h"
|
|
||||||
#include "_TPM_Hash_End_fp.h"
|
|
||||||
#include "TpmFail_fp.h"
|
|
||||||
#include "TpmTcpProtocol.h"
|
|
||||||
#include "Simulator_fp.h"
|
|
||||||
#ifdef TPM_WINDOWS
|
|
||||||
#include "TcpServer_fp.h" /* kgold */
|
|
||||||
#endif
|
|
||||||
#ifdef TPM_POSIX
|
|
||||||
#include "TcpServerPosix_fp.h" /* kgold */
|
|
||||||
#endif
|
|
||||||
#include "TpmProfile.h" /* kgold */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define TPM_RH_ACT_0 0x40000110
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// FILE GENERATED BY TpmExtractCode: DO NOT EDIT
|
// FILE GENERATED BY TpmExtractCode: DO NOT EDIT
|
||||||
|
|
||||||
#ifndef _TPM_INCLUDE_PRIVATE_TPMALGORITHMDEFINES_H_
|
#ifndef _TPM_INCLUDE_PRIVATE_TPMALGORITHMDEFINES_H_
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// this file defines the desired command list that should be built into the
|
// this file defines the desired command list that should be built into the
|
||||||
// Tpm Core Lib.
|
// Tpm Core Lib.
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
// clang-format off to preserve define alignment breaking sections.
|
// clang-format off to preserve define alignment breaking sections.
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// FILE GENERATED BY TpmExtractCode: DO NOT EDIT
|
// FILE GENERATED BY TpmExtractCode: DO NOT EDIT
|
||||||
|
|
||||||
#ifndef _TPM_INCLUDE_PRIVATE_TPMTYPES_H_
|
#ifndef _TPM_INCLUDE_PRIVATE_TPMTYPES_H_
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _VENDORINFO_H
|
#ifndef _VENDORINFO_H
|
||||||
#define _VENDORINFO_H
|
#define _VENDORINFO_H
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// common headers for simulator implementation files
|
// common headers for simulator implementation files
|
||||||
|
|
||||||
#ifndef SIMULATOR_PRIVATE_H
|
#ifndef SIMULATOR_PRIVATE_H
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
// This file represents the functional interface that all platform libraries must
|
// This file represents the functional interface that all platform libraries must
|
||||||
// provide because they are called by the Core TPM library.
|
// provide because they are called by the Core TPM library.
|
||||||
#ifndef _TPM_TO_PLATFORM_INTERFACE_H_
|
#ifndef _TPM_TO_PLATFORM_INTERFACE_H_
|
||||||
|
Loading…
Reference in New Issue
Block a user