mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-20 11:45:32 +00:00
rev148: Rework RUNTIME_SIZE_CHECKS
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
5c45518fae
commit
a55577bd2a
@ -83,7 +83,7 @@ TPM_Manufacture(
|
||||
)
|
||||
{
|
||||
TPM_SU orderlyShutdown;
|
||||
#ifdef RUNTIME_SIZE_CHECKS
|
||||
#if RUNTIME_SIZE_CHECKS
|
||||
// Call the function to verify the sizes of values that result from different
|
||||
// compile options.
|
||||
TpmSizeChecks();
|
||||
|
||||
@ -173,13 +173,16 @@
|
||||
#ifndef COMPILER_CHECKS
|
||||
//# define COMPILER_CHECKS
|
||||
#endif
|
||||
/* Some of the values (such as sizes) are the result of different options set in
|
||||
Implementation.h. The combination might not be consistent. A function is defined
|
||||
(TpmSizeChecks()) that is used to verify the sizes at run time. To enable the function, define
|
||||
this parameter. */
|
||||
#ifndef RUNTIME_SIZE_CHECKS
|
||||
#define RUNTIME_SIZE_CHECKS
|
||||
#endif
|
||||
// Some of the values (such as sizes) are the result of different options set in
|
||||
// Implementation.h. The combination might not be consistent. A function is defined
|
||||
// (TpmSizeChecks()) that is used to verify the sizes at run time. To enable the function, define
|
||||
// this parameter.
|
||||
# if !(defined RUNTIME_SIZE_CHECKS) \
|
||||
|| ((RUNTIME_SIZE_CHECKS != NO) && (RUNTIME_SIZE_CHECKS != YES))
|
||||
# undef RUNTIME_SIZE_CHECKS
|
||||
# define RUNTIME_SIZE_CHECKS NO // Default: Either YES or NO
|
||||
# endif
|
||||
|
||||
|
||||
/* If doing debug, can set the DRBG to print out the intermediate test values. Before enabling this,
|
||||
make sure that the dbgDumpMemBlock() function has been added someplace (preferably, somewhere in
|
||||
|
||||
Loading…
Reference in New Issue
Block a user