From 232b00cef4e2635f842b5bdf8dae7fb49f17a85d Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Fri, 17 Apr 2020 19:12:30 -0400 Subject: [PATCH] tpm2: rev162: Rename MAX_DERIVATION_BITS to TPM_MAX_DERIVATION_BITS Signed-off-by: Stefan Berger --- src/tpm2/NVMarshal.c | 2 +- src/tpm2/ObjectCommands.c | 6 +++--- src/tpm2/TpmProfile.h | 3 --- src/tpm2/TpmTypes.h | 1 + 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/tpm2/NVMarshal.c b/src/tpm2/NVMarshal.c index 8e26063f..9ea4e3e4 100644 --- a/src/tpm2/NVMarshal.c +++ b/src/tpm2/NVMarshal.c @@ -3619,7 +3619,7 @@ static const struct _entry { { COMPILE_CONSTANT(CRT_FORMAT_RSA, EQ) }, { COMPILE_CONSTANT(VENDOR_COMMAND_COUNT, EQ) }, { COMPILE_CONSTANT(MAX_VENDOR_BUFFER_SIZE, EQ) }, - { COMPILE_CONSTANT(MAX_DERIVATION_BITS, EQ) }, + { COMPILE_CONSTANT(TPM_MAX_DERIVATION_BITS, EQ) }, { COMPILE_CONSTANT(PROOF_SIZE, EQ) }, { COMPILE_CONSTANT(HASH_COUNT, EQ) }, }; diff --git a/src/tpm2/ObjectCommands.c b/src/tpm2/ObjectCommands.c index 256580ca..e842cddc 100644 --- a/src/tpm2/ObjectCommands.c +++ b/src/tpm2/ObjectCommands.c @@ -3,7 +3,7 @@ /* Object Commands */ /* Written by Ken Goldman */ /* IBM Thomas J. Watson Research Center */ -/* $Id: ObjectCommands.c 1529 2019-11-21 23:29:01Z kgoldman $ */ +/* $Id: ObjectCommands.c 1594 2020-03-26 22:15:48Z kgoldman $ */ /* */ /* Licenses and Notices */ /* */ @@ -55,7 +55,7 @@ /* arising in any way out of use or reliance upon this specification or any */ /* information herein. */ /* */ -/* (c) Copyright IBM Corp. and others, 2016 - 2019 */ +/* (c) Copyright IBM Corp. and others, 2016 - 2020 */ /* */ /********************************************************************************/ @@ -485,7 +485,7 @@ TPM2_CreateLoaded( &parent->sensitive.sensitive.bits.b, &labelContext.label.b, &labelContext.context.b, - MAX_DERIVATION_BITS); + TPM_MAX_DERIVATION_BITS); // Clear the sensitive size so that the creation functions will not try // to use this value. in->inSensitive.sensitive.data.t.size = 0; diff --git a/src/tpm2/TpmProfile.h b/src/tpm2/TpmProfile.h index b6cd3d7a..9c194ffe 100644 --- a/src/tpm2/TpmProfile.h +++ b/src/tpm2/TpmProfile.h @@ -310,9 +310,6 @@ #ifndef MAX_VENDOR_BUFFER_SIZE #define MAX_VENDOR_BUFFER_SIZE 1024 #endif -#ifndef MAX_DERIVATION_BITS -#define MAX_DERIVATION_BITS 8192 -#endif #ifndef SIZE_OF_X509_SERIAL_NUMBER #define SIZE_OF_X509_SERIAL_NUMBER 20 #endif diff --git a/src/tpm2/TpmTypes.h b/src/tpm2/TpmTypes.h index f56f2583..0927a2fd 100644 --- a/src/tpm2/TpmTypes.h +++ b/src/tpm2/TpmTypes.h @@ -328,6 +328,7 @@ typedef UINT32 TPM_SPEC; typedef UINT32 TPM_CONSTANTS32; #define TYPE_OF_TPM_CONSTANTS32 UINT32 #define TPM_GENERATED_VALUE (TPM_CONSTANTS32)(0xFF544347) +#define TPM_MAX_DERIVATION_BITS (TPM_CONSTANTS32)8192 /* Table 2:16 - Definition of TPM_RC Constants */ typedef UINT32 TPM_RC;