Merge pull request #407 from dgarske/fixes-20250306

Various: Cleanup for public area copy and added cmake provisioning option
pull/408/head
Eric Blankenhorn 2025-03-19 13:10:52 -05:00 committed by GitHub
commit c99619df16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -79,6 +79,15 @@ check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY)
# * wait state
# * small stack
# Provisioning
set(WOLFTPM_PROVISIONING "yes" CACHE STRING
"Enable support for Provisioning Initial Device Identity (IDevID) and Attestation Identity Keys (default: enabled)")
set_property(CACHE WOLFTPM_PROVISIONING
PROPERTY STRINGS "yes;no;verbose")
if(WOLFTPM_PROVISIONING)
list(APPEND WOLFTPM_DEFINITIONS
"-DWOLFTPM_PROVISIONING")
endif()
# Enable Debugging
set(WOLFTPM_DEBUG "no" CACHE STRING

View File

@ -1871,7 +1871,7 @@ int wolfTPM2_CreateKey(WOLFTPM2_DEV* dev, WOLFTPM2_KEYBLOB* keyBlob,
XMEMCPY(createIn.inSensitive.sensitive.userAuth.buffer, auth,
createIn.inSensitive.sensitive.userAuth.size);
}
XMEMCPY(&createIn.inPublic.publicArea, publicTemplate, sizeof(TPMT_PUBLIC));
wolfTPM2_CopyPubT(&createIn.inPublic.publicArea, publicTemplate);
#if 0
/* Optional creation nonce */