rev148: Rework RUNTIME_SIZE_CHECKS

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2018-07-11 12:17:16 -04:00 committed by Stefan Berger
parent 5c45518fae
commit a55577bd2a
2 changed files with 11 additions and 8 deletions

View File

@ -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();

View File

@ -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