mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-15 21:30:56 +00:00
tpm2: Use CONTEXT_SLOT definition from TpmProfile.h
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
1f686aa8e9
commit
2a28b96aac
@ -73,6 +73,7 @@ _REDUCE_WARNING_LEVEL_(2)
|
||||
#include <stddef.h>
|
||||
_NORMAL_WARNING_LEVEL_
|
||||
#include "BackwardsCompatibility.h" // libtpms added
|
||||
|
||||
#include "Capabilities.h"
|
||||
#include "TpmTypes.h"
|
||||
#include "CommandAttributes.h"
|
||||
@ -922,10 +923,6 @@ typedef struct state_reset_data
|
||||
UINT64 objectContextID; // This is the context ID for a saved
|
||||
// object context. The default reset
|
||||
// value is 0.
|
||||
#ifndef NDEBUG
|
||||
#undef CONTEXT_SLOT
|
||||
#define CONTEXT_SLOT BYTE
|
||||
#endif
|
||||
CONTEXT_SLOT contextArray[MAX_ACTIVE_SESSIONS]; // This array contains
|
||||
// contains the values used to track
|
||||
// the version numbers of saved
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
/* Build Switches */
|
||||
/* Written by Ken Goldman */
|
||||
/* IBM Thomas J. Watson Research Center */
|
||||
/* $Id: TpmBuildSwitches.h 1476 2019-06-10 19:32:03Z kgoldman $ */
|
||||
/* $Id: TpmBuildSwitches.h 1529 2019-11-21 23:29:01Z kgoldman $ */
|
||||
/* */
|
||||
/* Licenses and Notices */
|
||||
/* */
|
||||
@ -211,6 +211,12 @@
|
||||
// The switches in this group can only be enabled when doing debug during simulation
|
||||
#if SIMULATION && DEBUG
|
||||
|
||||
/* This forces the use of a smaller context slot size. This reduction reduces the range of the epoch
|
||||
allowing the tester to force the epoch to occur faster than the normal defined in TpmProfile.h */
|
||||
# if !(defined CONTEXT_SLOT)
|
||||
# define CONTEXT_SLOT UINT8
|
||||
# endif
|
||||
|
||||
// Enables use of the key cache. Default is YES
|
||||
# if !(defined USE_RSA_KEY_CACHE) \
|
||||
|| ((USE_RSA_KEY_CACHE != NO) && (USE_RSA_KEY_CACHE != YES))
|
||||
|
||||
@ -220,7 +220,7 @@
|
||||
#define MAX_ACTIVE_SESSIONS 64
|
||||
#endif
|
||||
#ifndef CONTEXT_SLOT
|
||||
#define CONTEXT_SLOT UINT16
|
||||
#define CONTEXT_SLOT UINT8 /* libtpms: use 'old' type */
|
||||
#endif
|
||||
#ifndef CONTEXT_COUNTER
|
||||
#define CONTEXT_COUNTER UINT64
|
||||
|
||||
Loading…
Reference in New Issue
Block a user