From 6991d86c3e4fd8e93da93ba1be3e5159dc3d2215 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 15:36:53 +0000 Subject: [PATCH] import UBI tpm2-tss-4.1.3-5.el10 --- .gitignore | 2 +- .tpm2-tss.metadata | 1 - ...Remove-OpenSSL-engine-API-dependency.patch | 81 + ...ization-of-app-data-in-Esys_Initiali.patch | 39 - ...Loaded-fix-resource-name-calculation.patch | 128 -- ...ror-code-on-memory-allocation-failur.patch | 25 - ...-exported-symbols-map-for-libtss2-mu.patch | 51 - ...t-handle-node-before-calling-compute.patch | 1314 ----------------- ...artAuthSession-called-with-optional-.patch | 45 - ...c-calculation-for-tpm2_clear-command.patch | 39 - ...ysize-of-ECC-curve-TPM2_ECC_NISTP224.patch | 29 - ...te_encrypted_salt-err-handling-in-Es.patch | 47 - ...x-salt-after-on-startAuthSession_fin.patch | 38 - ...-use-memcmp-in-byte-array-comparison.patch | 62 - ...n-Clean-up-libmandoc-parser-warnings.patch | 84 -- ...e-of-VLAs-for-Marshalling-TPML-types.patch | 71 - ...r-variable-type-for-cmdAuthsArray-co.patch | 29 - ...ollHandles-should-allow-num_handles-.patch | 39 - ...entation-fault-if-name_conf-is-too-b.patch | 39 - ...he-private-implementation-of-strndup.patch | 96 -- ..._rc-ensure-layer-number-is-in-bounds.patch | 139 -- ...et-calculation-is-not-spec-compliant.patch | 31 - ...-issue-where-nonceTPM-was-included-t.patch | 45 - ...overflow-in-xor-parameter-obfuscatio.patch | 42 - SPECS/tpm2-tss.spec | 239 --- sources | 1 + tpm2-tss-3.0.0-doxygen.patch | 15 + tpm2-tss-systemd-sysusers.conf | 2 + tpm2-tss.spec | 389 +++++ 29 files changed, 489 insertions(+), 2673 deletions(-) delete mode 100644 .tpm2-tss.metadata create mode 100644 0001-Remove-OpenSSL-engine-API-dependency.patch delete mode 100644 SOURCES/0001-ESYS-Fix-initialization-of-app-data-in-Esys_Initiali.patch delete mode 100644 SOURCES/0001-Esys_CreateLoaded-fix-resource-name-calculation.patch delete mode 100644 SOURCES/0001-Return-proper-error-code-on-memory-allocation-failur.patch delete mode 100644 SOURCES/0001-build-update-exported-symbols-map-for-libtss2-mu.patch delete mode 100644 SOURCES/0001-esys-Check-object-handle-node-before-calling-compute.patch delete mode 100644 SOURCES/0001-esys-fix-Esys_StartAuthSession-called-with-optional-.patch delete mode 100644 SOURCES/0001-esys-fix-hmac-calculation-for-tpm2_clear-command.patch delete mode 100644 SOURCES/0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch delete mode 100644 SOURCES/0001-esys-fixup-compute_encrypted_salt-err-handling-in-Es.patch delete mode 100644 SOURCES/0001-esys-zero-out-ctx-salt-after-on-startAuthSession_fin.patch delete mode 100644 SOURCES/0001-esys_iutil-use-memcmp-in-byte-array-comparison.patch delete mode 100644 SOURCES/0001-man-Clean-up-libmandoc-parser-warnings.patch delete mode 100644 SOURCES/0001-mu-Remove-use-of-VLAs-for-Marshalling-TPML-types.patch delete mode 100644 SOURCES/0001-sys-match-counter-variable-type-for-cmdAuthsArray-co.patch delete mode 100644 SOURCES/0001-tcti-device-getPollHandles-should-allow-num_handles-.patch delete mode 100644 SOURCES/0001-tctildr-fix-segmentation-fault-if-name_conf-is-too-b.patch delete mode 100644 SOURCES/0001-tctildr-remove-the-private-implementation-of-strndup.patch delete mode 100644 SOURCES/0001-tss2_rc-ensure-layer-number-is-in-bounds.patch delete mode 100644 SOURCES/0002-esys-Shared-secret-calculation-is-not-spec-compliant.patch delete mode 100644 SOURCES/0003-esys_iutil.c-Fix-issue-where-nonceTPM-was-included-t.patch delete mode 100644 SOURCES/0004-ESYS-Fix-buffer-overflow-in-xor-parameter-obfuscatio.patch delete mode 100644 SPECS/tpm2-tss.spec create mode 100644 sources create mode 100644 tpm2-tss-3.0.0-doxygen.patch create mode 100644 tpm2-tss-systemd-sysusers.conf create mode 100644 tpm2-tss.spec diff --git a/.gitignore b/.gitignore index 66e371f..464f0fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/tpm2-tss-2.3.2.tar.gz +tpm2-tss-4.1.3.tar.gz diff --git a/.tpm2-tss.metadata b/.tpm2-tss.metadata deleted file mode 100644 index 3667521..0000000 --- a/.tpm2-tss.metadata +++ /dev/null @@ -1 +0,0 @@ -c24ce8b20a8686ada775239389292f6d78020668 SOURCES/tpm2-tss-2.3.2.tar.gz diff --git a/0001-Remove-OpenSSL-engine-API-dependency.patch b/0001-Remove-OpenSSL-engine-API-dependency.patch new file mode 100644 index 0000000..6386851 --- /dev/null +++ b/0001-Remove-OpenSSL-engine-API-dependency.patch @@ -0,0 +1,81 @@ +From e9d4ab91da392ad855e2c54ad437356ccc2ad24c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Hor=C3=A1=C4=8Dek?= + +Date: Tue, 8 Oct 2024 16:36:21 +0200 +Subject: [PATCH] Remove OpenSSL engine API dependency +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Štěpán Horáček +--- + src/tss2-esys/esys_crypto_ossl.c | 1 - + test/integration/fapi-data-crypt.int.c | 1 - + test/integration/fapi-ext-public-key.int.c | 1 - + test/integration/fapi-key-create-policy-signed-keyedhash.int.c | 1 - + test/integration/fapi-key-create-policy-signed.int.c | 1 - + 5 files changed, 5 deletions(-) + +diff --git a/src/tss2-esys/esys_crypto_ossl.c b/src/tss2-esys/esys_crypto_ossl.c +index 1620788c..b990f6e3 100644 +--- a/src/tss2-esys/esys_crypto_ossl.c ++++ b/src/tss2-esys/esys_crypto_ossl.c +@@ -19,7 +19,6 @@ + #include + #include + #endif +-#include + #include + + #include "tss2_esys.h" +diff --git a/test/integration/fapi-data-crypt.int.c b/test/integration/fapi-data-crypt.int.c +index 07437b62..cc0dfd62 100644 +--- a/test/integration/fapi-data-crypt.int.c ++++ b/test/integration/fapi-data-crypt.int.c +@@ -15,7 +15,6 @@ + + #include + #include +-#include + #include + + #include "tss2_fapi.h" +diff --git a/test/integration/fapi-ext-public-key.int.c b/test/integration/fapi-ext-public-key.int.c +index 787a6c9c..5d30d2c1 100644 +--- a/test/integration/fapi-ext-public-key.int.c ++++ b/test/integration/fapi-ext-public-key.int.c +@@ -11,7 +11,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/test/integration/fapi-key-create-policy-signed-keyedhash.int.c b/test/integration/fapi-key-create-policy-signed-keyedhash.int.c +index f9f4131d..d65ea10b 100644 +--- a/test/integration/fapi-key-create-policy-signed-keyedhash.int.c ++++ b/test/integration/fapi-key-create-policy-signed-keyedhash.int.c +@@ -17,7 +17,6 @@ + + #include + #include +-#include + #include + + #include "tss2_fapi.h" +diff --git a/test/integration/fapi-key-create-policy-signed.int.c b/test/integration/fapi-key-create-policy-signed.int.c +index d20554aa..0eb848e9 100644 +--- a/test/integration/fapi-key-create-policy-signed.int.c ++++ b/test/integration/fapi-key-create-policy-signed.int.c +@@ -17,7 +17,6 @@ + + #include + #include +-#include + #include + + #include "tss2_fapi.h" +-- +2.46.2 + diff --git a/SOURCES/0001-ESYS-Fix-initialization-of-app-data-in-Esys_Initiali.patch b/SOURCES/0001-ESYS-Fix-initialization-of-app-data-in-Esys_Initiali.patch deleted file mode 100644 index da3d4ac..0000000 --- a/SOURCES/0001-ESYS-Fix-initialization-of-app-data-in-Esys_Initiali.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 285667d640b8dd7d2d80e0c5d5fcc44f6abad442 Mon Sep 17 00:00:00 2001 -From: Juergen Repp -Date: Mon, 27 Apr 2020 16:33:16 +0200 -Subject: [PATCH 1/4] ESYS: Fix initialization of app data in Esys_Initialize - (Fixes #1704). - -An unintended free of the tcti parameter in cleanup was possible. - -Signed-off-by: Juergen Repp ---- - src/tss2-esys/esys_context.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/tss2-esys/esys_context.c b/src/tss2-esys/esys_context.c -index b912a688..150a3495 100644 ---- a/src/tss2-esys/esys_context.c -+++ b/src/tss2-esys/esys_context.c -@@ -54,15 +54,15 @@ Esys_Initialize(ESYS_CONTEXT ** esys_context, TSS2_TCTI_CONTEXT * tcti, - *esys_context = calloc(1, sizeof(ESYS_CONTEXT)); - return_if_null(*esys_context, "Out of memory.", TSS2_ESYS_RC_MEMORY); - -+ /* Store the application provided tcti to be return on Esys_GetTcti(). */ -+ (*esys_context)->tcti_app_param = tcti; -+ - /* Allocate memory for the SYS context */ - syssize = Tss2_Sys_GetContextSize(0); - (*esys_context)->sys = calloc(1, syssize); - goto_if_null((*esys_context)->sys, "Error: During malloc.", - TSS2_ESYS_RC_MEMORY, cleanup_return); - -- /* Store the application provided tcti to be return on Esys_GetTcti(). */ -- (*esys_context)->tcti_app_param = tcti; -- - /* If no tcti was provided, initialize the default one. */ - if (tcti == NULL) { - r = Tss2_TctiLdr_Initialize (NULL, &tcti); --- -2.41.0 - diff --git a/SOURCES/0001-Esys_CreateLoaded-fix-resource-name-calculation.patch b/SOURCES/0001-Esys_CreateLoaded-fix-resource-name-calculation.patch deleted file mode 100644 index a6db576..0000000 --- a/SOURCES/0001-Esys_CreateLoaded-fix-resource-name-calculation.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 70e9fae7ef535e7cf27a72ddbc818dfefcbdbdbb Mon Sep 17 00:00:00 2001 -From: William Roberts -Date: Wed, 18 Sep 2019 11:29:57 -0700 -Subject: [PATCH] Esys_CreateLoaded: fix resource name calculation - -The name calculated and cached for the ESYS_TR resource object was based -on the user supplied TPMT_PUBLIC. However, this template is often -missing data that the TPM fills in and returns in the TPM2B_PUBLIC -structure. Because of this, the cached name returned from -Esys_TR_GetName() and the name read from Esys_ReadPublic() would differ. - -Add a test to detect this condition and correct it by copying the -returned TPM2B_PUBLIC to the ESYS_TR resource nodes TPM2B_PUBLIC cache -and calculate the name off of that. - -Fixes: #1516 - -Signed-off-by: William Roberts ---- - src/tss2-esys/api/Esys_CreateLoaded.c | 14 ++++----- - test/integration/esys-createloaded.int.c | 37 ++++++++++++++++++++++++ - 2 files changed, 42 insertions(+), 9 deletions(-) - -diff --git a/src/tss2-esys/api/Esys_CreateLoaded.c b/src/tss2-esys/api/Esys_CreateLoaded.c -index a92649cade27..44c4400fcff9 100644 ---- a/src/tss2-esys/api/Esys_CreateLoaded.c -+++ b/src/tss2-esys/api/Esys_CreateLoaded.c -@@ -317,14 +317,6 @@ Esys_CreateLoaded_Finish( - goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup); - } - -- /* Update the meta data of the ESYS_TR object */ -- objectHandleNode->rsrc.rsrcType = IESYSC_KEY_RSRC; -- size_t offset = 0; -- r = Tss2_MU_TPMT_PUBLIC_Unmarshal(&esysContext->in.CreateLoaded.inPublic->buffer[0], -- sizeof(TPMT_PUBLIC), &offset , -- &objectHandleNode->rsrc.misc.rsrc_key_pub.publicArea); -- goto_if_error(r, "Unmarshal TPMT_PUBULIC", error_cleanup); -- - /*Receive the TPM response and handle resubmissions if necessary. */ - r = Tss2_Sys_ExecuteFinish(esysContext->sys, esysContext->timeout); - if ((r & ~TSS2_RC_LAYER_MASK) == TSS2_BASE_RC_TRY_AGAIN) { -@@ -386,8 +378,12 @@ Esys_CreateLoaded_Finish( - error_cleanup); - - -+ /* Update the meta data of the ESYS_TR object */ -+ objectHandleNode->rsrc.rsrcType = IESYSC_KEY_RSRC; -+ objectHandleNode->rsrc.misc.rsrc_key_pub = *loutPublic; -+ - /* Check name and outPublic for consistency */ -- if (!iesys_compare_name(loutPublic, &name)) -+ if (!iesys_compare_name(&objectHandleNode->rsrc.misc.rsrc_key_pub, &name)) - goto_error(r, TSS2_ESYS_RC_MALFORMED_RESPONSE, - "in Public name not equal name in response", error_cleanup); - -diff --git a/test/integration/esys-createloaded.int.c b/test/integration/esys-createloaded.int.c -index ec8d68a0d43d..118f2a3bb1ff 100644 ---- a/test/integration/esys-createloaded.int.c -+++ b/test/integration/esys-createloaded.int.c -@@ -8,6 +8,7 @@ - #include - #endif - -+#include - #include - - #include "tss2_esys.h" -@@ -19,6 +20,35 @@ - #include "util/log.h" - #include "util/aux_util.h" - -+static bool check_name(ESYS_CONTEXT * esys_context, ESYS_TR object_handle) -+{ -+ bool result = false; -+ -+ TPM2B_NAME *read_name = NULL; -+ TPM2B_NAME *get_name = NULL; -+ -+ TSS2_RC r = Esys_ReadPublic(esys_context, object_handle, -+ ESYS_TR_NONE, ESYS_TR_NONE, ESYS_TR_NONE, -+ NULL, &read_name, NULL); -+ goto_if_error(r, "Error esys readpublic", out); -+ -+ r = Esys_TR_GetName(esys_context, object_handle, &get_name); -+ goto_if_error(r, "Error esys getname", out); -+ -+ if (read_name->size != get_name->size) { -+ LOG_ERROR("name size mismatch %u != %u", -+ read_name->size, get_name->size); -+ goto out; -+ } -+ -+ result = memcmp(read_name->name, get_name->name, get_name->size) == 0; -+ -+out: -+ free(read_name); -+ free(get_name); -+ -+ return result; -+} - /** This test is intended to test the ESAPI command CreateLoaded. - * - * We start by creating a primary key (Esys_CreatePrimary). -@@ -29,6 +59,8 @@ - * - Esys_CreatePrimary() (M) - * - Esys_FlushContext() (M) - * - Esys_StartAuthSession() (M) -+ * - Esys_TR_GetName() (M) -+ * - Esys_TR_ReadPublic() (M) - * - * Used compiler defines: TEST_SESSION - * -@@ -239,6 +271,11 @@ test_esys_createloaded(ESYS_CONTEXT * esys_context) - - goto_if_error(r, "Error During CreateLoaded", error); - -+ bool names_match = check_name(esys_context, objectHandle); -+ if (!names_match) { -+ goto error; -+ } -+ - r = Esys_FlushContext(esys_context, primaryHandle); - goto_if_error(r, "Flushing context", error); - --- -2.27.0 - diff --git a/SOURCES/0001-Return-proper-error-code-on-memory-allocation-failur.patch b/SOURCES/0001-Return-proper-error-code-on-memory-allocation-failur.patch deleted file mode 100644 index bb70296..0000000 --- a/SOURCES/0001-Return-proper-error-code-on-memory-allocation-failur.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 93aab9433b5d66a916e28016a4b60c4a1c39acfc Mon Sep 17 00:00:00 2001 -From: Pieter Agten -Date: Tue, 3 Dec 2019 20:52:29 +0100 -Subject: [PATCH] Return proper error code on memory allocation failure - -Signed-off-by: Pieter Agten ---- - src/tss2-tcti/tctildr.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/tss2-tcti/tctildr.c b/src/tss2-tcti/tctildr.c -index ff967317b57b..1528f6e52fd0 100644 ---- a/src/tss2-tcti/tctildr.c -+++ b/src/tss2-tcti/tctildr.c -@@ -421,6 +421,7 @@ Tss2_TctiLdr_Initialize_Ex (const char *name, - } - ldr_ctx = calloc (1, sizeof (TSS2_TCTILDR_CONTEXT)); - if (ldr_ctx == NULL) { -+ rc = TSS2_TCTI_RC_MEMORY; - goto err; - } - TSS2_TCTI_MAGIC (ldr_ctx) = TCTILDR_MAGIC; --- -2.27.0 - diff --git a/SOURCES/0001-build-update-exported-symbols-map-for-libtss2-mu.patch b/SOURCES/0001-build-update-exported-symbols-map-for-libtss2-mu.patch deleted file mode 100644 index 07dde22..0000000 --- a/SOURCES/0001-build-update-exported-symbols-map-for-libtss2-mu.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b27956422d1b5bb53a56366e9b7e978f6b95e2f9 Mon Sep 17 00:00:00 2001 -From: Erik Larsson -Date: Mon, 2 Dec 2019 11:21:02 +0100 -Subject: [PATCH] build: update exported symbols map for libtss2-mu - -Signed-off-by: Erik Larsson ---- - lib/tss2-mu.def | 4 ++++ - lib/tss2-mu.map | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/lib/tss2-mu.def b/lib/tss2-mu.def -index 36f4ba37b9fc..3c80cf225f77 100644 ---- a/lib/tss2-mu.def -+++ b/lib/tss2-mu.def -@@ -226,6 +226,10 @@ EXPORTS - Tss2_MU_TPMU_PUBLIC_PARMS_Unmarshal - Tss2_MU_TPMU_PUBLIC_ID_Marshal - Tss2_MU_TPMU_PUBLIC_ID_Unmarshal -+ Tss2_MU_TPMU_NAME_Marshal -+ Tss2_MU_TPMU_NAME_Unmarshal -+ Tss2_MU_TPMU_ENCRYPTED_SECRET_Marshal -+ Tss2_MU_TPMU_ENCRYPTED_SECRET_Unmarshal - Tss2_MU_TPMT_HA_Marshal - Tss2_MU_TPMT_HA_Unmarshal - Tss2_MU_TPMT_SYM_DEF_Marshal -diff --git a/lib/tss2-mu.map b/lib/tss2-mu.map -index 8ac754ed096a..09d9317e6749 100644 ---- a/lib/tss2-mu.map -+++ b/lib/tss2-mu.map -@@ -228,6 +228,8 @@ - Tss2_MU_TPMU_PUBLIC_ID_Unmarshal; - Tss2_MU_TPMU_NAME_Marshal; - Tss2_MU_TPMU_NAME_Unmarshal; -+ Tss2_MU_TPMU_ENCRYPTED_SECRET_Marshal; -+ Tss2_MU_TPMU_ENCRYPTED_SECRET_Unmarshal; - Tss2_MU_TPMT_HA_Marshal; - Tss2_MU_TPMT_HA_Unmarshal; - Tss2_MU_TPMT_SYM_DEF_Marshal; -@@ -274,8 +276,6 @@ - Tss2_MU_TPM2_NT_Unmarshal; - Tss2_MU_TPMI_ALG_HASH_Marshal; - Tss2_MU_TPMI_ALG_HASH_Unmarshal; -- Tss2_MU_TPMI_BYTE_Marshal; -- Tss2_MU_TPMI_BYTE_Unmarshal; - local: - *; - }; --- -2.27.0 - diff --git a/SOURCES/0001-esys-Check-object-handle-node-before-calling-compute.patch b/SOURCES/0001-esys-Check-object-handle-node-before-calling-compute.patch deleted file mode 100644 index 2bee867..0000000 --- a/SOURCES/0001-esys-Check-object-handle-node-before-calling-compute.patch +++ /dev/null @@ -1,1314 +0,0 @@ -From f9a2e69bbc0e5f11ec2fe351ed8e610853857aba Mon Sep 17 00:00:00 2001 -From: Tadeusz Struk -Date: Thu, 9 Jan 2020 14:16:50 -0800 -Subject: [PATCH] esys: Check object handle node before calling - compute_session_value() - -Fixes: #1593 -Signed-off-by: Tadeusz Struk ---- - src/tss2-esys/api/Esys_ActivateCredential.c | 15 +++++++++++---- - src/tss2-esys/api/Esys_Certify.c | 12 ++++++++++-- - src/tss2-esys/api/Esys_CertifyCreation.c | 8 ++++++-- - src/tss2-esys/api/Esys_ChangeEPS.c | 8 ++++++-- - src/tss2-esys/api/Esys_ChangePPS.c | 6 +++++- - src/tss2-esys/api/Esys_Clear.c | 6 +++++- - src/tss2-esys/api/Esys_ClearControl.c | 6 +++++- - src/tss2-esys/api/Esys_ClockRateAdjust.c | 8 ++++++-- - src/tss2-esys/api/Esys_ClockSet.c | 6 +++++- - src/tss2-esys/api/Esys_Commit.c | 6 +++++- - src/tss2-esys/api/Esys_Create.c | 7 ++++++- - src/tss2-esys/api/Esys_CreateLoaded.c | 6 +++++- - src/tss2-esys/api/Esys_CreatePrimary.c | 6 +++++- - .../api/Esys_DictionaryAttackLockReset.c | 6 +++++- - .../api/Esys_DictionaryAttackParameters.c | 6 +++++- - src/tss2-esys/api/Esys_Duplicate.c | 6 +++++- - src/tss2-esys/api/Esys_ECDH_ZGen.c | 6 +++++- - src/tss2-esys/api/Esys_EncryptDecrypt.c | 6 +++++- - src/tss2-esys/api/Esys_EncryptDecrypt2.c | 6 +++++- - src/tss2-esys/api/Esys_EventSequenceComplete.c | 15 +++++++++++---- - src/tss2-esys/api/Esys_EvictControl.c | 6 +++++- - src/tss2-esys/api/Esys_FieldUpgradeStart.c | 6 +++++- - src/tss2-esys/api/Esys_GetCommandAuditDigest.c | 6 +++++- - src/tss2-esys/api/Esys_GetSessionAuditDigest.c | 6 +++++- - src/tss2-esys/api/Esys_GetTime.c | 6 +++++- - src/tss2-esys/api/Esys_HMAC.c | 6 +++++- - src/tss2-esys/api/Esys_HMAC_Start.c | 6 +++++- - src/tss2-esys/api/Esys_HierarchyChangeAuth.c | 6 +++++- - src/tss2-esys/api/Esys_HierarchyControl.c | 6 +++++- - src/tss2-esys/api/Esys_Import.c | 6 +++++- - src/tss2-esys/api/Esys_Load.c | 6 +++++- - src/tss2-esys/api/Esys_NV_Certify.c | 12 ++++++++++-- - src/tss2-esys/api/Esys_NV_ChangeAuth.c | 6 +++++- - src/tss2-esys/api/Esys_NV_DefineSpace.c | 6 +++++- - src/tss2-esys/api/Esys_NV_Extend.c | 6 +++++- - src/tss2-esys/api/Esys_NV_GlobalWriteLock.c | 6 +++++- - src/tss2-esys/api/Esys_NV_Increment.c | 6 +++++- - src/tss2-esys/api/Esys_NV_Read.c | 6 +++++- - src/tss2-esys/api/Esys_NV_ReadLock.c | 6 +++++- - src/tss2-esys/api/Esys_NV_SetBits.c | 6 +++++- - src/tss2-esys/api/Esys_NV_UndefineSpace.c | 6 +++++- - src/tss2-esys/api/Esys_NV_UndefineSpaceSpecial.c | 12 ++++++++++-- - src/tss2-esys/api/Esys_NV_Write.c | 6 +++++- - src/tss2-esys/api/Esys_NV_WriteLock.c | 6 +++++- - src/tss2-esys/api/Esys_ObjectChangeAuth.c | 6 +++++- - src/tss2-esys/api/Esys_PCR_Allocate.c | 6 +++++- - src/tss2-esys/api/Esys_PCR_Event.c | 6 +++++- - src/tss2-esys/api/Esys_PCR_Extend.c | 6 +++++- - src/tss2-esys/api/Esys_PCR_Reset.c | 6 +++++- - src/tss2-esys/api/Esys_PCR_SetAuthPolicy.c | 6 +++++- - src/tss2-esys/api/Esys_PCR_SetAuthValue.c | 6 +++++- - src/tss2-esys/api/Esys_PP_Commands.c | 6 +++++- - src/tss2-esys/api/Esys_PolicyAuthorizeNV.c | 6 +++++- - src/tss2-esys/api/Esys_PolicyNV.c | 6 +++++- - src/tss2-esys/api/Esys_PolicySecret.c | 6 +++++- - src/tss2-esys/api/Esys_Quote.c | 6 +++++- - src/tss2-esys/api/Esys_RSA_Decrypt.c | 6 +++++- - src/tss2-esys/api/Esys_Rewrap.c | 6 +++++- - src/tss2-esys/api/Esys_SequenceComplete.c | 9 ++++++--- - src/tss2-esys/api/Esys_SequenceUpdate.c | 9 ++++++--- - src/tss2-esys/api/Esys_SetAlgorithmSet.c | 6 +++++- - .../api/Esys_SetCommandCodeAuditStatus.c | 6 +++++- - src/tss2-esys/api/Esys_SetPrimaryPolicy.c | 6 +++++- - src/tss2-esys/api/Esys_Sign.c | 6 +++++- - src/tss2-esys/api/Esys_Unseal.c | 6 +++++- - src/tss2-esys/api/Esys_ZGen_2Phase.c | 6 +++++- - 66 files changed, 363 insertions(+), 82 deletions(-) - -diff --git a/src/tss2-esys/api/Esys_ActivateCredential.c b/src/tss2-esys/api/Esys_ActivateCredential.c -index 3d332521528e..9377ad2a0627 100644 ---- a/src/tss2-esys/api/Esys_ActivateCredential.c -+++ b/src/tss2-esys/api/Esys_ActivateCredential.c -@@ -194,10 +194,17 @@ Esys_ActivateCredential_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -- &activateHandleNode->rsrc.name, &activateHandleNode->auth); -- iesys_compute_session_value(esysContext->session_tab[1], -- &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ if (activateHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], -+ &activateHandleNode->rsrc.name, &activateHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ -+ if (keyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[1], -+ &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - - /* Generate the auth values and set them in the SAPI command buffer */ -diff --git a/src/tss2-esys/api/Esys_Certify.c b/src/tss2-esys/api/Esys_Certify.c -index d34d70b88ff7..96c627606684 100644 ---- a/src/tss2-esys/api/Esys_Certify.c -+++ b/src/tss2-esys/api/Esys_Certify.c -@@ -193,10 +193,18 @@ Esys_Certify_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (objectHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &objectHandleNode->rsrc.name, &objectHandleNode->auth); -- iesys_compute_session_value(esysContext->session_tab[1], -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ -+ if (signHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[1], - &signHandleNode->rsrc.name, &signHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - - /* Generate the auth values and set them in the SAPI command buffer */ -diff --git a/src/tss2-esys/api/Esys_CertifyCreation.c b/src/tss2-esys/api/Esys_CertifyCreation.c -index 04c07a9bf33c..3135a49f77ca 100644 ---- a/src/tss2-esys/api/Esys_CertifyCreation.c -+++ b/src/tss2-esys/api/Esys_CertifyCreation.c -@@ -209,8 +209,12 @@ Esys_CertifyCreation_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -- &signHandleNode->rsrc.name, &signHandleNode->auth); -+ if (signHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], -+ &signHandleNode->rsrc.name, &signHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ChangeEPS.c b/src/tss2-esys/api/Esys_ChangeEPS.c -index 954c442547f3..d76a613d417e 100644 ---- a/src/tss2-esys/api/Esys_ChangeEPS.c -+++ b/src/tss2-esys/api/Esys_ChangeEPS.c -@@ -175,8 +175,12 @@ Esys_ChangeEPS_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -- &authHandleNode->rsrc.name, &authHandleNode->auth); -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], -+ &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ChangePPS.c b/src/tss2-esys/api/Esys_ChangePPS.c -index c182533cebc5..ea0f9746c247 100644 ---- a/src/tss2-esys/api/Esys_ChangePPS.c -+++ b/src/tss2-esys/api/Esys_ChangePPS.c -@@ -175,8 +175,12 @@ Esys_ChangePPS_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Clear.c b/src/tss2-esys/api/Esys_Clear.c -index 96ffb470309f..f5c0b827425a 100644 ---- a/src/tss2-esys/api/Esys_Clear.c -+++ b/src/tss2-esys/api/Esys_Clear.c -@@ -174,8 +174,12 @@ Esys_Clear_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ClearControl.c b/src/tss2-esys/api/Esys_ClearControl.c -index a9fcd1b5e2e9..a4d8b4d0bab6 100644 ---- a/src/tss2-esys/api/Esys_ClearControl.c -+++ b/src/tss2-esys/api/Esys_ClearControl.c -@@ -181,8 +181,12 @@ Esys_ClearControl_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authNode->rsrc.name, &authNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ClockRateAdjust.c b/src/tss2-esys/api/Esys_ClockRateAdjust.c -index cb25c8502d23..931645c95296 100644 ---- a/src/tss2-esys/api/Esys_ClockRateAdjust.c -+++ b/src/tss2-esys/api/Esys_ClockRateAdjust.c -@@ -179,8 +179,12 @@ Esys_ClockRateAdjust_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -- &authNode->rsrc.name, &authNode->auth); -+ if (authNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], -+ &authNode->rsrc.name, &authNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ClockSet.c b/src/tss2-esys/api/Esys_ClockSet.c -index 7191576aec6b..b38219e7cbf3 100644 ---- a/src/tss2-esys/api/Esys_ClockSet.c -+++ b/src/tss2-esys/api/Esys_ClockSet.c -@@ -179,8 +179,12 @@ Esys_ClockSet_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authNode->rsrc.name, &authNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Commit.c b/src/tss2-esys/api/Esys_Commit.c -index 52298e4c7c6c..8992c20ca419 100644 ---- a/src/tss2-esys/api/Esys_Commit.c -+++ b/src/tss2-esys/api/Esys_Commit.c -@@ -190,8 +190,12 @@ Esys_Commit_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (signHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &signHandleNode->rsrc.name, &signHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Create.c b/src/tss2-esys/api/Esys_Create.c -index c7e59f7ed5ff..c21ed7bc7d42 100644 ---- a/src/tss2-esys/api/Esys_Create.c -+++ b/src/tss2-esys/api/Esys_Create.c -@@ -204,8 +204,13 @@ Esys_Create_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ -+ if (parentHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &parentHandleNode->rsrc.name, &parentHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_CreateLoaded.c b/src/tss2-esys/api/Esys_CreateLoaded.c -index a92649cade27..7b366045e5eb 100644 ---- a/src/tss2-esys/api/Esys_CreateLoaded.c -+++ b/src/tss2-esys/api/Esys_CreateLoaded.c -@@ -210,8 +210,12 @@ Esys_CreateLoaded_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (parentHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &parentHandleNode->rsrc.name, &parentHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_CreatePrimary.c b/src/tss2-esys/api/Esys_CreatePrimary.c -index 9eb19042e7bb..a9b9e8f2dfe6 100644 ---- a/src/tss2-esys/api/Esys_CreatePrimary.c -+++ b/src/tss2-esys/api/Esys_CreatePrimary.c -@@ -223,8 +223,12 @@ Esys_CreatePrimary_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (primaryHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &primaryHandleNode->rsrc.name, &primaryHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_DictionaryAttackLockReset.c b/src/tss2-esys/api/Esys_DictionaryAttackLockReset.c -index 1e8207fe7cfc..bada24bd3dbd 100644 ---- a/src/tss2-esys/api/Esys_DictionaryAttackLockReset.c -+++ b/src/tss2-esys/api/Esys_DictionaryAttackLockReset.c -@@ -176,8 +176,12 @@ Esys_DictionaryAttackLockReset_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (lockHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &lockHandleNode->rsrc.name, &lockHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_DictionaryAttackParameters.c b/src/tss2-esys/api/Esys_DictionaryAttackParameters.c -index f10aa2f06b46..a61a5b4d4f26 100644 ---- a/src/tss2-esys/api/Esys_DictionaryAttackParameters.c -+++ b/src/tss2-esys/api/Esys_DictionaryAttackParameters.c -@@ -198,8 +198,12 @@ Esys_DictionaryAttackParameters_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (lockHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &lockHandleNode->rsrc.name, &lockHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Duplicate.c b/src/tss2-esys/api/Esys_Duplicate.c -index d0e5799897e2..c587fd740af7 100644 ---- a/src/tss2-esys/api/Esys_Duplicate.c -+++ b/src/tss2-esys/api/Esys_Duplicate.c -@@ -202,8 +202,12 @@ Esys_Duplicate_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (objectHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &objectHandleNode->rsrc.name, &objectHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ECDH_ZGen.c b/src/tss2-esys/api/Esys_ECDH_ZGen.c -index 24e487363f0f..dad825960e62 100644 ---- a/src/tss2-esys/api/Esys_ECDH_ZGen.c -+++ b/src/tss2-esys/api/Esys_ECDH_ZGen.c -@@ -171,8 +171,12 @@ Esys_ECDH_ZGen_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (keyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_EncryptDecrypt.c b/src/tss2-esys/api/Esys_EncryptDecrypt.c -index 506f22e68317..e3b6cc64f58a 100644 ---- a/src/tss2-esys/api/Esys_EncryptDecrypt.c -+++ b/src/tss2-esys/api/Esys_EncryptDecrypt.c -@@ -196,8 +196,12 @@ Esys_EncryptDecrypt_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (keyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_EncryptDecrypt2.c b/src/tss2-esys/api/Esys_EncryptDecrypt2.c -index a6fa4b1f2185..bdbae8392f57 100644 ---- a/src/tss2-esys/api/Esys_EncryptDecrypt2.c -+++ b/src/tss2-esys/api/Esys_EncryptDecrypt2.c -@@ -190,8 +190,12 @@ Esys_EncryptDecrypt2_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (keyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_EventSequenceComplete.c b/src/tss2-esys/api/Esys_EventSequenceComplete.c -index c318a67a4369..6ee7904a358d 100644 ---- a/src/tss2-esys/api/Esys_EventSequenceComplete.c -+++ b/src/tss2-esys/api/Esys_EventSequenceComplete.c -@@ -189,11 +189,18 @@ Esys_EventSequenceComplete_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (pcrHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &pcrHandleNode->rsrc.name, &pcrHandleNode->auth); -- iesys_compute_session_value(esysContext->session_tab[1], -- sequenceHandleNode ? &sequenceHandleNode->rsrc.name : NULL, -- sequenceHandleNode ? &sequenceHandleNode->auth : NULL); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ -+ if (sequenceHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[1], -+ &sequenceHandleNode->rsrc.name, &sequenceHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - - /* Generate the auth values and set them in the SAPI command buffer */ -diff --git a/src/tss2-esys/api/Esys_EvictControl.c b/src/tss2-esys/api/Esys_EvictControl.c -index fe7aaaccf888..faade51c7060 100644 ---- a/src/tss2-esys/api/Esys_EvictControl.c -+++ b/src/tss2-esys/api/Esys_EvictControl.c -@@ -209,8 +209,12 @@ Esys_EvictControl_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authNode->rsrc.name, &authNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_FieldUpgradeStart.c b/src/tss2-esys/api/Esys_FieldUpgradeStart.c -index 27f963accf40..2e1a07e29700 100644 ---- a/src/tss2-esys/api/Esys_FieldUpgradeStart.c -+++ b/src/tss2-esys/api/Esys_FieldUpgradeStart.c -@@ -196,8 +196,12 @@ Esys_FieldUpgradeStart_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authorizationNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authorizationNode->rsrc.name, &authorizationNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_GetCommandAuditDigest.c b/src/tss2-esys/api/Esys_GetCommandAuditDigest.c -index 0c3b642b3c51..714b3706bf40 100644 ---- a/src/tss2-esys/api/Esys_GetCommandAuditDigest.c -+++ b/src/tss2-esys/api/Esys_GetCommandAuditDigest.c -@@ -196,8 +196,12 @@ Esys_GetCommandAuditDigest_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (privacyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &privacyHandleNode->rsrc.name, &privacyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], - &signHandleNode->rsrc.name, &signHandleNode->auth); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); -diff --git a/src/tss2-esys/api/Esys_GetSessionAuditDigest.c b/src/tss2-esys/api/Esys_GetSessionAuditDigest.c -index 9d7ef314a637..38a62787d892 100644 ---- a/src/tss2-esys/api/Esys_GetSessionAuditDigest.c -+++ b/src/tss2-esys/api/Esys_GetSessionAuditDigest.c -@@ -210,8 +210,12 @@ Esys_GetSessionAuditDigest_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (privacyAdminHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &privacyAdminHandleNode->rsrc.name, &privacyAdminHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], - &signHandleNode->rsrc.name, &signHandleNode->auth); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); -diff --git a/src/tss2-esys/api/Esys_GetTime.c b/src/tss2-esys/api/Esys_GetTime.c -index 2142b8ec47df..6948dcbdcba6 100644 ---- a/src/tss2-esys/api/Esys_GetTime.c -+++ b/src/tss2-esys/api/Esys_GetTime.c -@@ -194,8 +194,12 @@ Esys_GetTime_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (privacyAdminHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &privacyAdminHandleNode->rsrc.name, &privacyAdminHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], - &signHandleNode->rsrc.name, &signHandleNode->auth); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); -diff --git a/src/tss2-esys/api/Esys_HMAC.c b/src/tss2-esys/api/Esys_HMAC.c -index 0d92f1c0c363..0e57c647d959 100644 ---- a/src/tss2-esys/api/Esys_HMAC.c -+++ b/src/tss2-esys/api/Esys_HMAC.c -@@ -177,8 +177,12 @@ Esys_HMAC_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (handleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &handleNode->rsrc.name, &handleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_HMAC_Start.c b/src/tss2-esys/api/Esys_HMAC_Start.c -index afecbfbaf0a6..b129be39a4d2 100644 ---- a/src/tss2-esys/api/Esys_HMAC_Start.c -+++ b/src/tss2-esys/api/Esys_HMAC_Start.c -@@ -194,8 +194,12 @@ Esys_HMAC_Start_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (handleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &handleNode->rsrc.name, &handleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_HierarchyChangeAuth.c b/src/tss2-esys/api/Esys_HierarchyChangeAuth.c -index 90d87bb5d76c..39672ed6823b 100644 ---- a/src/tss2-esys/api/Esys_HierarchyChangeAuth.c -+++ b/src/tss2-esys/api/Esys_HierarchyChangeAuth.c -@@ -194,8 +194,12 @@ Esys_HierarchyChangeAuth_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_HierarchyControl.c b/src/tss2-esys/api/Esys_HierarchyControl.c -index 16fd593a6484..55207f20e6d2 100644 ---- a/src/tss2-esys/api/Esys_HierarchyControl.c -+++ b/src/tss2-esys/api/Esys_HierarchyControl.c -@@ -189,8 +189,12 @@ Esys_HierarchyControl_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Import.c b/src/tss2-esys/api/Esys_Import.c -index d7c36352b21f..8c24ed410c37 100644 ---- a/src/tss2-esys/api/Esys_Import.c -+++ b/src/tss2-esys/api/Esys_Import.c -@@ -199,8 +199,12 @@ Esys_Import_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (parentHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &parentHandleNode->rsrc.name, &parentHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Load.c b/src/tss2-esys/api/Esys_Load.c -index b695991924c8..410d9c8bcc73 100644 ---- a/src/tss2-esys/api/Esys_Load.c -+++ b/src/tss2-esys/api/Esys_Load.c -@@ -191,8 +191,12 @@ Esys_Load_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (parentHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &parentHandleNode->rsrc.name, &parentHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_Certify.c b/src/tss2-esys/api/Esys_NV_Certify.c -index 8f0eb6e65536..8b79fb69dae0 100644 ---- a/src/tss2-esys/api/Esys_NV_Certify.c -+++ b/src/tss2-esys/api/Esys_NV_Certify.c -@@ -215,10 +215,18 @@ Esys_NV_Certify_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (signHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &signHandleNode->rsrc.name, &signHandleNode->auth); -- iesys_compute_session_value(esysContext->session_tab[1], -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[1], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - - /* Generate the auth values and set them in the SAPI command buffer */ -diff --git a/src/tss2-esys/api/Esys_NV_ChangeAuth.c b/src/tss2-esys/api/Esys_NV_ChangeAuth.c -index d2aced330113..3004a3dd4b1d 100644 ---- a/src/tss2-esys/api/Esys_NV_ChangeAuth.c -+++ b/src/tss2-esys/api/Esys_NV_ChangeAuth.c -@@ -190,8 +190,12 @@ Esys_NV_ChangeAuth_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (nvIndexNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &nvIndexNode->rsrc.name, &nvIndexNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_DefineSpace.c b/src/tss2-esys/api/Esys_NV_DefineSpace.c -index 01b6a3e3fd7b..70ae2a73d0be 100644 ---- a/src/tss2-esys/api/Esys_NV_DefineSpace.c -+++ b/src/tss2-esys/api/Esys_NV_DefineSpace.c -@@ -213,8 +213,12 @@ Esys_NV_DefineSpace_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_Extend.c b/src/tss2-esys/api/Esys_NV_Extend.c -index 23eeabddc24d..0b3d61b99405 100644 ---- a/src/tss2-esys/api/Esys_NV_Extend.c -+++ b/src/tss2-esys/api/Esys_NV_Extend.c -@@ -194,8 +194,12 @@ Esys_NV_Extend_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_GlobalWriteLock.c b/src/tss2-esys/api/Esys_NV_GlobalWriteLock.c -index f84ec4f0994e..56a9b1171462 100644 ---- a/src/tss2-esys/api/Esys_NV_GlobalWriteLock.c -+++ b/src/tss2-esys/api/Esys_NV_GlobalWriteLock.c -@@ -176,8 +176,12 @@ Esys_NV_GlobalWriteLock_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_Increment.c b/src/tss2-esys/api/Esys_NV_Increment.c -index 17504c6db1f1..6248b4b6c007 100644 ---- a/src/tss2-esys/api/Esys_NV_Increment.c -+++ b/src/tss2-esys/api/Esys_NV_Increment.c -@@ -195,8 +195,12 @@ Esys_NV_Increment_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_Read.c b/src/tss2-esys/api/Esys_NV_Read.c -index f97784f72b85..40f54ec7fea4 100644 ---- a/src/tss2-esys/api/Esys_NV_Read.c -+++ b/src/tss2-esys/api/Esys_NV_Read.c -@@ -192,8 +192,12 @@ Esys_NV_Read_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_ReadLock.c b/src/tss2-esys/api/Esys_NV_ReadLock.c -index ee15450f3e09..529446a02b30 100644 ---- a/src/tss2-esys/api/Esys_NV_ReadLock.c -+++ b/src/tss2-esys/api/Esys_NV_ReadLock.c -@@ -195,8 +195,12 @@ Esys_NV_ReadLock_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_SetBits.c b/src/tss2-esys/api/Esys_NV_SetBits.c -index a3d5508c0cbe..17d769880e16 100644 ---- a/src/tss2-esys/api/Esys_NV_SetBits.c -+++ b/src/tss2-esys/api/Esys_NV_SetBits.c -@@ -200,8 +200,12 @@ Esys_NV_SetBits_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_UndefineSpace.c b/src/tss2-esys/api/Esys_NV_UndefineSpace.c -index e816299dddbf..14a04789eb6e 100644 ---- a/src/tss2-esys/api/Esys_NV_UndefineSpace.c -+++ b/src/tss2-esys/api/Esys_NV_UndefineSpace.c -@@ -193,8 +193,12 @@ Esys_NV_UndefineSpace_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_UndefineSpaceSpecial.c b/src/tss2-esys/api/Esys_NV_UndefineSpaceSpecial.c -index c3df73f80a25..bd5aa2ef838d 100644 ---- a/src/tss2-esys/api/Esys_NV_UndefineSpaceSpecial.c -+++ b/src/tss2-esys/api/Esys_NV_UndefineSpaceSpecial.c -@@ -195,10 +195,18 @@ Esys_NV_UndefineSpaceSpecial_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (nvIndexNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &nvIndexNode->rsrc.name, &nvIndexNode->auth); -- iesys_compute_session_value(esysContext->session_tab[1], -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ -+ if (platformNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[1], - &platformNode->rsrc.name, &platformNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - - /* Generate the auth values and set them in the SAPI command buffer */ -diff --git a/src/tss2-esys/api/Esys_NV_Write.c b/src/tss2-esys/api/Esys_NV_Write.c -index f18e9d9724d7..c132def44c4a 100644 ---- a/src/tss2-esys/api/Esys_NV_Write.c -+++ b/src/tss2-esys/api/Esys_NV_Write.c -@@ -198,8 +198,12 @@ Esys_NV_Write_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_NV_WriteLock.c b/src/tss2-esys/api/Esys_NV_WriteLock.c -index b2a8f646aaf4..c8b7ef4d2bc6 100644 ---- a/src/tss2-esys/api/Esys_NV_WriteLock.c -+++ b/src/tss2-esys/api/Esys_NV_WriteLock.c -@@ -195,8 +195,12 @@ Esys_NV_WriteLock_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ObjectChangeAuth.c b/src/tss2-esys/api/Esys_ObjectChangeAuth.c -index e7e018893f68..408b354f057a 100644 ---- a/src/tss2-esys/api/Esys_ObjectChangeAuth.c -+++ b/src/tss2-esys/api/Esys_ObjectChangeAuth.c -@@ -183,8 +183,12 @@ Esys_ObjectChangeAuth_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (objectHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &objectHandleNode->rsrc.name, &objectHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PCR_Allocate.c b/src/tss2-esys/api/Esys_PCR_Allocate.c -index ea82b45182ae..d9a426ce8bab 100644 ---- a/src/tss2-esys/api/Esys_PCR_Allocate.c -+++ b/src/tss2-esys/api/Esys_PCR_Allocate.c -@@ -194,8 +194,12 @@ Esys_PCR_Allocate_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PCR_Event.c b/src/tss2-esys/api/Esys_PCR_Event.c -index 30ef453adc17..a01335629141 100644 ---- a/src/tss2-esys/api/Esys_PCR_Event.c -+++ b/src/tss2-esys/api/Esys_PCR_Event.c -@@ -176,8 +176,12 @@ Esys_PCR_Event_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (pcrHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &pcrHandleNode->rsrc.name, &pcrHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PCR_Extend.c b/src/tss2-esys/api/Esys_PCR_Extend.c -index bbb1e4133aa2..8e2d4ad39403 100644 ---- a/src/tss2-esys/api/Esys_PCR_Extend.c -+++ b/src/tss2-esys/api/Esys_PCR_Extend.c -@@ -179,8 +179,12 @@ Esys_PCR_Extend_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (pcrHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &pcrHandleNode->rsrc.name, &pcrHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PCR_Reset.c b/src/tss2-esys/api/Esys_PCR_Reset.c -index ed5a9aa49089..178a7924632c 100644 ---- a/src/tss2-esys/api/Esys_PCR_Reset.c -+++ b/src/tss2-esys/api/Esys_PCR_Reset.c -@@ -175,8 +175,12 @@ Esys_PCR_Reset_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (pcrHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &pcrHandleNode->rsrc.name, &pcrHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PCR_SetAuthPolicy.c b/src/tss2-esys/api/Esys_PCR_SetAuthPolicy.c -index a98817d36cd6..a7197c945103 100644 ---- a/src/tss2-esys/api/Esys_PCR_SetAuthPolicy.c -+++ b/src/tss2-esys/api/Esys_PCR_SetAuthPolicy.c -@@ -184,8 +184,12 @@ Esys_PCR_SetAuthPolicy_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PCR_SetAuthValue.c b/src/tss2-esys/api/Esys_PCR_SetAuthValue.c -index 8bd1e37b3bc5..68e7c8a6d95f 100644 ---- a/src/tss2-esys/api/Esys_PCR_SetAuthValue.c -+++ b/src/tss2-esys/api/Esys_PCR_SetAuthValue.c -@@ -175,8 +175,12 @@ Esys_PCR_SetAuthValue_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (pcrHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &pcrHandleNode->rsrc.name, &pcrHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PP_Commands.c b/src/tss2-esys/api/Esys_PP_Commands.c -index 188a5a459124..a7b803482a19 100644 ---- a/src/tss2-esys/api/Esys_PP_Commands.c -+++ b/src/tss2-esys/api/Esys_PP_Commands.c -@@ -189,8 +189,12 @@ Esys_PP_Commands_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authNode->rsrc.name, &authNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PolicyAuthorizeNV.c b/src/tss2-esys/api/Esys_PolicyAuthorizeNV.c -index bf52ec0d7041..4b71768872d7 100644 ---- a/src/tss2-esys/api/Esys_PolicyAuthorizeNV.c -+++ b/src/tss2-esys/api/Esys_PolicyAuthorizeNV.c -@@ -199,8 +199,12 @@ Esys_PolicyAuthorizeNV_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PolicyNV.c b/src/tss2-esys/api/Esys_PolicyNV.c -index 752856e2eda7..cfff5fc33da1 100644 ---- a/src/tss2-esys/api/Esys_PolicyNV.c -+++ b/src/tss2-esys/api/Esys_PolicyNV.c -@@ -206,8 +206,12 @@ Esys_PolicyNV_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_PolicySecret.c b/src/tss2-esys/api/Esys_PolicySecret.c -index 671c40cdba0c..c755578e9da7 100644 ---- a/src/tss2-esys/api/Esys_PolicySecret.c -+++ b/src/tss2-esys/api/Esys_PolicySecret.c -@@ -208,8 +208,12 @@ Esys_PolicySecret_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Quote.c b/src/tss2-esys/api/Esys_Quote.c -index 3c3f7f10f852..44ba57f2fe1a 100644 ---- a/src/tss2-esys/api/Esys_Quote.c -+++ b/src/tss2-esys/api/Esys_Quote.c -@@ -185,8 +185,12 @@ Esys_Quote_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (signHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &signHandleNode->rsrc.name, &signHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_RSA_Decrypt.c b/src/tss2-esys/api/Esys_RSA_Decrypt.c -index 30ec54e3d0d2..a4c953be1f3b 100644 ---- a/src/tss2-esys/api/Esys_RSA_Decrypt.c -+++ b/src/tss2-esys/api/Esys_RSA_Decrypt.c -@@ -182,8 +182,12 @@ Esys_RSA_Decrypt_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (keyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Rewrap.c b/src/tss2-esys/api/Esys_Rewrap.c -index f31538d008fc..f1127ce47706 100644 ---- a/src/tss2-esys/api/Esys_Rewrap.c -+++ b/src/tss2-esys/api/Esys_Rewrap.c -@@ -197,8 +197,12 @@ Esys_Rewrap_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (oldParentNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &oldParentNode->rsrc.name, &oldParentNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_SequenceComplete.c b/src/tss2-esys/api/Esys_SequenceComplete.c -index c6afd9097366..2227afc1f453 100644 ---- a/src/tss2-esys/api/Esys_SequenceComplete.c -+++ b/src/tss2-esys/api/Esys_SequenceComplete.c -@@ -190,9 +190,12 @@ Esys_SequenceComplete_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -- sequenceHandleNode ? &sequenceHandleNode->rsrc.name : NULL, -- sequenceHandleNode ? &sequenceHandleNode->auth : NULL); -+ if (sequenceHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], -+ &sequenceHandleNode->rsrc.name, &sequenceHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_SequenceUpdate.c b/src/tss2-esys/api/Esys_SequenceUpdate.c -index add3ec4f33bf..c1bc93daeb03 100644 ---- a/src/tss2-esys/api/Esys_SequenceUpdate.c -+++ b/src/tss2-esys/api/Esys_SequenceUpdate.c -@@ -175,9 +175,12 @@ Esys_SequenceUpdate_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -- sequenceHandleNode ? &sequenceHandleNode->rsrc.name : NULL, -- sequenceHandleNode ? &sequenceHandleNode->auth : NULL); -+ if (sequenceHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], -+ &sequenceHandleNode->rsrc.name, &sequenceHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_SetAlgorithmSet.c b/src/tss2-esys/api/Esys_SetAlgorithmSet.c -index d73771e3f74a..4716f04b8793 100644 ---- a/src/tss2-esys/api/Esys_SetAlgorithmSet.c -+++ b/src/tss2-esys/api/Esys_SetAlgorithmSet.c -@@ -182,8 +182,12 @@ Esys_SetAlgorithmSet_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_SetCommandCodeAuditStatus.c b/src/tss2-esys/api/Esys_SetCommandCodeAuditStatus.c -index 1290a87b7563..38268b94e1cb 100644 ---- a/src/tss2-esys/api/Esys_SetCommandCodeAuditStatus.c -+++ b/src/tss2-esys/api/Esys_SetCommandCodeAuditStatus.c -@@ -196,8 +196,12 @@ Esys_SetCommandCodeAuditStatus_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authNode->rsrc.name, &authNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_SetPrimaryPolicy.c b/src/tss2-esys/api/Esys_SetPrimaryPolicy.c -index 51272d57c8e2..73b676870704 100644 ---- a/src/tss2-esys/api/Esys_SetPrimaryPolicy.c -+++ b/src/tss2-esys/api/Esys_SetPrimaryPolicy.c -@@ -183,8 +183,12 @@ Esys_SetPrimaryPolicy_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (authHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &authHandleNode->rsrc.name, &authHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Sign.c b/src/tss2-esys/api/Esys_Sign.c -index 06a0a451e4d9..374c17d35543 100644 ---- a/src/tss2-esys/api/Esys_Sign.c -+++ b/src/tss2-esys/api/Esys_Sign.c -@@ -188,8 +188,12 @@ Esys_Sign_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (keyHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &keyHandleNode->rsrc.name, &keyHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_Unseal.c b/src/tss2-esys/api/Esys_Unseal.c -index 1ac785809fe8..b3203a0e5aae 100644 ---- a/src/tss2-esys/api/Esys_Unseal.c -+++ b/src/tss2-esys/api/Esys_Unseal.c -@@ -172,8 +172,12 @@ Esys_Unseal_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (itemHandleNode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &itemHandleNode->rsrc.name, &itemHandleNode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - -diff --git a/src/tss2-esys/api/Esys_ZGen_2Phase.c b/src/tss2-esys/api/Esys_ZGen_2Phase.c -index cb30880c3c71..c59996d35aea 100644 ---- a/src/tss2-esys/api/Esys_ZGen_2Phase.c -+++ b/src/tss2-esys/api/Esys_ZGen_2Phase.c -@@ -190,8 +190,12 @@ Esys_ZGen_2Phase_Async( - /* Calculate the cpHash Values */ - r = init_session_tab(esysContext, shandle1, shandle2, shandle3); - return_state_if_error(r, _ESYS_STATE_INIT, "Initialize session resources"); -- iesys_compute_session_value(esysContext->session_tab[0], -+ if (keyANode != NULL) -+ iesys_compute_session_value(esysContext->session_tab[0], - &keyANode->rsrc.name, &keyANode->auth); -+ else -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - iesys_compute_session_value(esysContext->session_tab[1], NULL, NULL); - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - --- -2.27.0 - diff --git a/SOURCES/0001-esys-fix-Esys_StartAuthSession-called-with-optional-.patch b/SOURCES/0001-esys-fix-Esys_StartAuthSession-called-with-optional-.patch deleted file mode 100644 index 5299421..0000000 --- a/SOURCES/0001-esys-fix-Esys_StartAuthSession-called-with-optional-.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 0bd19b61c8cd07d03b6efffc05f95d5ec427a3d6 Mon Sep 17 00:00:00 2001 -From: Tadeusz Struk -Date: Tue, 14 Jan 2020 10:55:20 -0800 -Subject: [PATCH] esys: fix Esys_StartAuthSession called with optional params - -For an HMAC session if any of the optional params are ESYS_TR_NONE -we need to use the same tpm2_handles TPM2_RH_NULL (0x40000007) -as in the prepare call to correctly calculate cpHash and HMAC -values for the session. - -Fixes: #1590 - -Signed-off-by: Tadeusz Struk ---- - src/tss2-esys/api/Esys_StartAuthSession.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/tss2-esys/api/Esys_StartAuthSession.c b/src/tss2-esys/api/Esys_StartAuthSession.c -index 313604a2077c..3ccd842a7572 100644 ---- a/src/tss2-esys/api/Esys_StartAuthSession.c -+++ b/src/tss2-esys/api/Esys_StartAuthSession.c -@@ -260,7 +260,19 @@ Esys_StartAuthSession_Async( - iesys_compute_session_value(esysContext->session_tab[2], NULL, NULL); - - /* Generate the auth values and set them in the SAPI command buffer */ -- r = iesys_gen_auths(esysContext, tpmKeyNode, bindNode, NULL, &auths); -+ -+ RSRC_NODE_T none; -+ size_t offset = 0; -+ none.rsrc.handle = TPM2_RH_NULL; -+ none.rsrc.rsrcType = IESYSC_WITHOUT_MISC_RSRC; -+ r = Tss2_MU_TPM2_HANDLE_Marshal(TPM2_RH_NULL, -+ none.rsrc.name.name, -+ sizeof(none.rsrc.name.name), -+ &offset); -+ return_state_if_error(r, _ESYS_STATE_INIT, "Marshaling TPM handle."); -+ none.rsrc.name.size = offset; -+ r = iesys_gen_auths(esysContext, tpmKeyNode ? tpmKeyNode : &none, -+ bindNode ? bindNode : &none, NULL, &auths); - return_state_if_error(r, _ESYS_STATE_INIT, - "Error in computation of auth values"); - --- -2.27.0 - diff --git a/SOURCES/0001-esys-fix-hmac-calculation-for-tpm2_clear-command.patch b/SOURCES/0001-esys-fix-hmac-calculation-for-tpm2_clear-command.patch deleted file mode 100644 index 320ac43..0000000 --- a/SOURCES/0001-esys-fix-hmac-calculation-for-tpm2_clear-command.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3d3808c3eb02c27f1b114baddd03960892044909 Mon Sep 17 00:00:00 2001 -From: Tadeusz Struk -Date: Mon, 2 Mar 2020 14:45:52 -0800 -Subject: [PATCH] esys: fix hmac calculation for tpm2_clear command - -After tpm2_clear command is executed it sets all ownerAuth, -endorsementAuth, and lockoutAuth to the Empty Buffer and then -this is used for a response auth calculation. -This requires to recalculate the esys session auth value after -tpm2_clear is executed or the calculated response HMAC value -will be invalid and the command will fail with -err: 0x0007001b "Authorizing the TPM response failed" - -Fixes: #1641 - -Signed-off-by: Tadeusz Struk ---- - src/tss2-esys/api/Esys_Clear.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/tss2-esys/api/Esys_Clear.c b/src/tss2-esys/api/Esys_Clear.c -index f5c0b827425a..0f43f7e9b85f 100644 ---- a/src/tss2-esys/api/Esys_Clear.c -+++ b/src/tss2-esys/api/Esys_Clear.c -@@ -199,6 +199,11 @@ Esys_Clear_Async( - return_state_if_error(r, _ESYS_STATE_INTERNALERROR, - "Finish (Execute Async)"); - -+ /* If the command authorization is LOCKOUT we need to -+ * recompute session value with an empty auth */ -+ if (authHandle == ESYS_TR_RH_LOCKOUT) -+ iesys_compute_session_value(esysContext->session_tab[0], NULL, NULL); -+ - esysContext->state = _ESYS_STATE_SENT; - - return r; --- -2.30.1 - diff --git a/SOURCES/0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch b/SOURCES/0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch deleted file mode 100644 index 71accc8..0000000 --- a/SOURCES/0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 76641c1e6b016979973fead7a24bb8fca4ee8325 Mon Sep 17 00:00:00 2001 -From: Johannes Holland -Date: Thu, 26 Sep 2019 09:46:09 +0100 -Subject: [PATCH] esys: fix keysize of ECC curve TPM2_ECC_NISTP224 - -In esys_crypto_ossl.c, for the ECC curve TPM2_ECC_NISTP244 a key size of -38 is selected. However, 224 bit / 8 bit/byte = 28 byte. - -Signed-off-by: Johannes Holland ---- - src/tss2-esys/esys_crypto_ossl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tss2-esys/esys_crypto_ossl.c b/src/tss2-esys/esys_crypto_ossl.c -index 124501964ae7..3c5d86d69705 100644 ---- a/src/tss2-esys/esys_crypto_ossl.c -+++ b/src/tss2-esys/esys_crypto_ossl.c -@@ -804,7 +804,7 @@ iesys_cryptossl_get_ecdh_point(TPM2B_PUBLIC *key, - break; - case TPM2_ECC_NIST_P224: - curveId = NID_secp224r1; -- key_size = 38; -+ key_size = 28; - break; - case TPM2_ECC_NIST_P256: - curveId = NID_X9_62_prime256v1; --- -2.27.0 - diff --git a/SOURCES/0001-esys-fixup-compute_encrypted_salt-err-handling-in-Es.patch b/SOURCES/0001-esys-fixup-compute_encrypted_salt-err-handling-in-Es.patch deleted file mode 100644 index 3b4fc20..0000000 --- a/SOURCES/0001-esys-fixup-compute_encrypted_salt-err-handling-in-Es.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 380d5f9ec3aa1f5e456598fe66d275467660177b Mon Sep 17 00:00:00 2001 -From: Tadeusz Struk -Date: Thu, 16 Jan 2020 09:27:04 -0800 -Subject: [PATCH] esys: fixup compute_encrypted_salt err handling in - Esys_StartAuthSession - -Use return_state_if_error() macro for compute_encrypted_salt() -error handling in Esys_StartAuthSession to maintain the correct -context state. - -Signed-off-by: Tadeusz Struk ---- - src/tss2-esys/api/Esys_StartAuthSession.c | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - -diff --git a/src/tss2-esys/api/Esys_StartAuthSession.c b/src/tss2-esys/api/Esys_StartAuthSession.c -index 3ccd842a7572..1717928a717d 100644 ---- a/src/tss2-esys/api/Esys_StartAuthSession.c -+++ b/src/tss2-esys/api/Esys_StartAuthSession.c -@@ -223,20 +223,15 @@ Esys_StartAuthSession_Async( - TSS2_RC r2; - r2 = iesys_compute_encrypted_salt(esysContext, tpmKeyNode, - &encryptedSaltAux); -- return_if_error(r2, "Error in parameter encryption."); -+ return_state_if_error(r2, _ESYS_STATE_INIT, "Error in parameter encryption."); - - if (nonceCaller == NULL) { - r2 = iesys_crypto_hash_get_digest_size(authHash,&authHash_size); -- if (r2 != TSS2_RC_SUCCESS) { -- LOG_ERROR("Error: initialize auth session (%x).", r2); -- return r2; -- } -+ return_state_if_error(r2, _ESYS_STATE_INIT, "Error in hash_get_digest_size."); -+ - r2 = iesys_crypto_random2b(&esysContext->in.StartAuthSession.nonceCallerData, - authHash_size); -- if (r2 != TSS2_RC_SUCCESS) { -- LOG_ERROR("Error: initialize auth session (%x).", r2); -- return r2; -- } -+ return_state_if_error(r2, _ESYS_STATE_INIT, "Error in crypto_random2b."); - esysContext->in.StartAuthSession.nonceCaller - = &esysContext->in.StartAuthSession.nonceCallerData; - nonceCaller = esysContext->in.StartAuthSession.nonceCaller; --- -2.27.0 - diff --git a/SOURCES/0001-esys-zero-out-ctx-salt-after-on-startAuthSession_fin.patch b/SOURCES/0001-esys-zero-out-ctx-salt-after-on-startAuthSession_fin.patch deleted file mode 100644 index eed03d3..0000000 --- a/SOURCES/0001-esys-zero-out-ctx-salt-after-on-startAuthSession_fin.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 1ec07af70925ece698b733d55dedd1d9878b70f2 Mon Sep 17 00:00:00 2001 -From: Tadeusz Struk -Date: Fri, 24 Jan 2020 19:05:34 -0800 -Subject: [PATCH] esys: zero out ctx->salt after on startAuthSession_finish - -The ctx->salt is used to calculate session key during -startAuthSession call if the caller pass a valid tpmKey -parameter. There salt is calculated in the _Async call -and the the session key is calculated in the _Finish call. -The problem is that if in the same context an unsalted -session is created after a salted session the ctx->salt -will still hold the old value and it will incorrectly -be used for session key calculation in the the subsequent -_Finish call. To fix this the salt needs to be set to -cleaned after no longer needed. - -Fixes: #1574 - -Signed-off-by: Tadeusz Struk ---- - src/tss2-esys/api/Esys_StartAuthSession.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/tss2-esys/api/Esys_StartAuthSession.c b/src/tss2-esys/api/Esys_StartAuthSession.c -index 1717928a717d..6367419d7c9a 100644 ---- a/src/tss2-esys/api/Esys_StartAuthSession.c -+++ b/src/tss2-esys/api/Esys_StartAuthSession.c -@@ -497,6 +497,7 @@ Esys_StartAuthSession_Finish( - goto_if_error(r, "Marshal session name", error_cleanup); - - sessionHandleNode->rsrc.name.size = offset; -+ memset(&esysContext->salt, '\0', sizeof(esysContext->salt)); - esysContext->state = _ESYS_STATE_INIT; - - return TSS2_RC_SUCCESS; --- -2.27.0 - diff --git a/SOURCES/0001-esys_iutil-use-memcmp-in-byte-array-comparison.patch b/SOURCES/0001-esys_iutil-use-memcmp-in-byte-array-comparison.patch deleted file mode 100644 index 511378f..0000000 --- a/SOURCES/0001-esys_iutil-use-memcmp-in-byte-array-comparison.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0bf42a4489973005ddd912a800dfb92eff2806e8 Mon Sep 17 00:00:00 2001 -From: William Roberts -Date: Mon, 16 Sep 2019 17:12:23 -0700 -Subject: [PATCH] esys_iutil: use memcmp in byte array comparison - -Rather than a byte for byte forloop, use memcmp() so the compiler can -use architectural optimizations. - -Signed-off-by: William Roberts ---- - src/tss2-esys/esys_iutil.c | 27 +++++---------------------- - 1 file changed, 5 insertions(+), 22 deletions(-) - -diff --git a/src/tss2-esys/esys_iutil.c b/src/tss2-esys/esys_iutil.c -index 94d0332c5b7d..08a9b7dffcbd 100644 ---- a/src/tss2-esys/esys_iutil.c -+++ b/src/tss2-esys/esys_iutil.c -@@ -35,23 +35,6 @@ cmp_UINT16(const UINT16 * in1, const UINT16 * in2) - } - } - --/** -- * Compare variables of type BYTE. -- * @param[in] in1 Variable to be compared with: -- * @param[in] in2 -- */ --static bool --cmp_BYTE(const BYTE * in1, const BYTE * in2) --{ -- LOG_TRACE("call"); -- if (*in1 == *in2) -- return true; -- else { -- LOG_TRACE("cmp false"); -- return false; -- } --} -- - /** - * Compare two arrays of type BYTE. - * @param[in] in1 array to be compared with:. -@@ -65,12 +48,12 @@ cmp_BYTE_array(const BYTE * in1, size_t count1, const BYTE * in2, size_t count2) - LOG_TRACE("cmp false"); - return false; - } -- for (size_t i = 0; i < count1; i++) { -- if (!cmp_BYTE(&in1[i], &in2[i])) { -- LOG_TRACE("cmp false"); -- return false; -- } -+ -+ if (memcmp(in1, in2, count2) != 0) { -+ LOG_TRACE("cmp false"); -+ return false; - } -+ - return true; - } - --- -2.27.0 - diff --git a/SOURCES/0001-man-Clean-up-libmandoc-parser-warnings.patch b/SOURCES/0001-man-Clean-up-libmandoc-parser-warnings.patch deleted file mode 100644 index e32f1b4..0000000 --- a/SOURCES/0001-man-Clean-up-libmandoc-parser-warnings.patch +++ /dev/null @@ -1,84 +0,0 @@ -From d696645b147eaac5d5c90ff3dca672e52d89d7f0 Mon Sep 17 00:00:00 2001 -From: Jerry Snitselaar -Date: Mon, 27 Apr 2020 12:16:47 -0700 -Subject: [PATCH] man: Clean up libmandoc parser warnings - -- Fix typo in Tss2_Tcti_Device_Init.3.in. -- Remove .RE macros that had no preceding .RS macro in Tss2_TctiLdr_Initialize.3.in. - Replace .RE .sp with .LP. -- ' is a control character, format function names to be similar to - other manpages, and use \(oq and \(cq for quotes instead in tss2-tctildr.7.in. - -Signed-off-by: Jerry Snitselaar ---- - man/Tss2_TctiLdr_Initialize.3.in | 6 ++---- - man/Tss2_Tcti_Device_Init.3.in | 2 +- - man/tss2-tctildr.7.in | 12 ++++++++---- - 3 files changed, 11 insertions(+), 9 deletions(-) - -diff --git a/man/Tss2_TctiLdr_Initialize.3.in b/man/Tss2_TctiLdr_Initialize.3.in -index 8e5fffaa247b..eb5ea1f8315f 100644 ---- a/man/Tss2_TctiLdr_Initialize.3.in -+++ b/man/Tss2_TctiLdr_Initialize.3.in -@@ -65,8 +65,7 @@ libtss2-tcti-tabrmd.so.0 - libtss2-tcti-device.so.0 - .IP \[bu] - libtss2-tcti-mssim.so.0 --.RE --.sp -+.LP - When the - .I name - string is neither NULL nor the empty string the implementation will attempt -@@ -81,8 +80,7 @@ name with the following permutations: - libtss2-tcti-.so.0 - .IP \[bu] - libtss2-tcti-.so --.RE --.sp -+.LP - The - .I config - string is not interpreted by the TctiLdr init functions and is passed -diff --git a/man/Tss2_Tcti_Device_Init.3.in b/man/Tss2_Tcti_Device_Init.3.in -index 3cd2eed7fb0b..122ede1536bc 100644 ---- a/man/Tss2_Tcti_Device_Init.3.in -+++ b/man/Tss2_Tcti_Device_Init.3.in -@@ -86,7 +86,7 @@ is returned if any parameters contain unexpected values. - is returned if any parameters are NULL when they should not be. - .B TSS2_TCTI_RC_BAD_CONTEXT - is returned if the size of the provided --.i tctiContext -+.I tctiContext - is insufficient. - .SH EXAMPLE - TCTI initialization fragment: -diff --git a/man/tss2-tctildr.7.in b/man/tss2-tctildr.7.in -index a907aec0cd64..7432316ec6bb 100644 ---- a/man/tss2-tctildr.7.in -+++ b/man/tss2-tctildr.7.in -@@ -10,13 +10,17 @@ instances. - .SH DESCRIPTION - The TCTI dynamic loading and initialization protocol requires a lot of - boilerplate code. To reduce duplication the tss2-tctildr library adds the --'Tss2_TctiLdr_Initialize', 'Tss2_TctiLdr_Initialize_Ex' and --'Tss2_TctiLdr_Finalize' functions to abstract away the machinery required -+.BR Tss2_TctiLdr_Initialize (), -+.BR Tss2_TctiLdr_Initialize_Ex (), -+and -+.BR Tss2_TctiLdr_Finalize () -+functions to abstract away the machinery required - to load, initialize, and finalize a TCTI context. - - To assist in the discovery of TCTIs this library provides the --'Tss2_TctiLdr_GetInfo' function. This function, paired with a 'free' --function to free the memory allocated by 'GetInfo', provides a simple -+.BR Tss2_TctiLdr_GetInfo () -+function. This function, paired with a \(oqfree\(cq -+function to free the memory allocated by \(oqGetInfo\(cq, provides a simple - query interface for discovery of the available and default TCTIs - available to the tss2-tctildr implementation - --- -2.24.0 - diff --git a/SOURCES/0001-mu-Remove-use-of-VLAs-for-Marshalling-TPML-types.patch b/SOURCES/0001-mu-Remove-use-of-VLAs-for-Marshalling-TPML-types.patch deleted file mode 100644 index 867293b..0000000 --- a/SOURCES/0001-mu-Remove-use-of-VLAs-for-Marshalling-TPML-types.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 58ee0fd916671942e62ac9930f18225761a6dd66 Mon Sep 17 00:00:00 2001 -From: Joe Richey -Date: Tue, 21 Jan 2020 20:04:45 -0800 -Subject: [PATCH] mu: Remove use of VLAs for Marshalling TPML types - -All of the `Tss2_MU_*_Marshal()` functions have the property that -`buffer` can be NULL, `offset` can be NULL, but both cannot be -NULL. Some Marshal functions check this directly (returning -`TSS2_MU_RC_BAD_REFERENCE` on error), but most do this by composing -existing Marshalling functions together. - -The TMPL Marshal functions does things differently, it creates a local -VLA `local_buffer[buffer_size]` and uses that as the buffer pointer if -a NULL buffer is given. This is unnecessary, as this pointer is only -used for debug logging and passed to other Marshalling functions, which -will correctly handle a NULL buffer. - -Note that the VLA in the existing code is of length `buffer_size` (the -length of the _entire_ buffer, _not_ the length of the data being -unmarshaled). This can potentially result in a very large stack -allocation, or stack overflow. - -Signed-off-by: Joe Richey ---- - src/tss2-mu/tpml-types.c | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/src/tss2-mu/tpml-types.c b/src/tss2-mu/tpml-types.c -index 9506a26efd14..ae1ed6177d75 100644 ---- a/src/tss2-mu/tpml-types.c -+++ b/src/tss2-mu/tpml-types.c -@@ -29,8 +29,6 @@ TSS2_RC Tss2_MU_##type##_Marshal(type const *src, uint8_t buffer[], \ - size_t local_offset = 0; \ - UINT32 i, count = 0; \ - TSS2_RC ret = TSS2_RC_SUCCESS; \ -- uint8_t *buf_ptr = buffer; \ -- uint8_t local_buffer[buffer_size]; \ - \ - if (offset != NULL) { \ - LOG_TRACE("offset non-NULL, initial value: %zu", *offset); \ -@@ -60,24 +58,21 @@ TSS2_RC Tss2_MU_##type##_Marshal(type const *src, uint8_t buffer[], \ - LOG_WARNING("count too big"); \ - return TSS2_SYS_RC_BAD_VALUE; \ - } \ --\ -- if (buf_ptr == NULL) \ -- buf_ptr = local_buffer; \ - \ - LOG_DEBUG(\ - "Marshalling " #type " from 0x%" PRIxPTR " to buffer 0x%" PRIxPTR \ - " at index 0x%zx", \ - (uintptr_t)&src, \ -- (uintptr_t)buf_ptr, \ -+ (uintptr_t)buffer, \ - local_offset); \ - \ -- ret = Tss2_MU_UINT32_Marshal(src->count, buf_ptr, buffer_size, &local_offset); \ -+ ret = Tss2_MU_UINT32_Marshal(src->count, buffer, buffer_size, &local_offset); \ - if (ret) \ - return ret; \ - \ - for (i = 0; i < src->count; i++) \ - { \ -- ret = marshal_func(op src->buf_name[i], buf_ptr, buffer_size, &local_offset); \ -+ ret = marshal_func(op src->buf_name[i], buffer, buffer_size, &local_offset); \ - if (ret) \ - return ret; \ - } \ --- -2.27.0 - diff --git a/SOURCES/0001-sys-match-counter-variable-type-for-cmdAuthsArray-co.patch b/SOURCES/0001-sys-match-counter-variable-type-for-cmdAuthsArray-co.patch deleted file mode 100644 index b8e4098..0000000 --- a/SOURCES/0001-sys-match-counter-variable-type-for-cmdAuthsArray-co.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5ab8190843597ff6a255c59f91582e4dca117927 Mon Sep 17 00:00:00 2001 -From: Jonas Witschel -Date: Thu, 21 Nov 2019 14:49:27 +0100 -Subject: [PATCH] sys: match counter variable type for cmdAuthsArray->count - -TSS2L_SYS_AUTH_COMMAND.count is defined as uint16_t, so the counter -variable should be uint16_t as well. - -Signed-off-by: Jonas Witschel ---- - src/tss2-sys/api/Tss2_Sys_SetCmdAuths.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tss2-sys/api/Tss2_Sys_SetCmdAuths.c b/src/tss2-sys/api/Tss2_Sys_SetCmdAuths.c -index 1bc3f3c2556f..d946c14e5cfb 100644 ---- a/src/tss2-sys/api/Tss2_Sys_SetCmdAuths.c -+++ b/src/tss2-sys/api/Tss2_Sys_SetCmdAuths.c -@@ -20,7 +20,7 @@ TSS2_RC Tss2_Sys_SetCmdAuths( - const TSS2L_SYS_AUTH_COMMAND *cmdAuthsArray) - { - _TSS2_SYS_CONTEXT_BLOB *ctx = syscontext_cast(sysContext); -- uint8_t i; -+ uint16_t i; - UINT32 authSize = 0; - UINT32 newCmdSize = 0; - size_t authOffset; --- -2.27.0 - diff --git a/SOURCES/0001-tcti-device-getPollHandles-should-allow-num_handles-.patch b/SOURCES/0001-tcti-device-getPollHandles-should-allow-num_handles-.patch deleted file mode 100644 index 776d11b..0000000 --- a/SOURCES/0001-tcti-device-getPollHandles-should-allow-num_handles-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c42450a294c4267998aa16a477e9218ee5953aa9 Mon Sep 17 00:00:00 2001 -From: Jeffrey Ferreira -Date: Thu, 19 Sep 2019 13:32:00 -0700 -Subject: [PATCH] tcti-device: getPollHandles should allow num_handles query - -Signed-off-by: Jeffrey Ferreira ---- - src/tss2-tcti/tcti-device.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/src/tss2-tcti/tcti-device.c b/src/tss2-tcti/tcti-device.c -index 44c9fe2083d5..53a698cad061 100644 ---- a/src/tss2-tcti/tcti-device.c -+++ b/src/tss2-tcti/tcti-device.c -@@ -368,12 +368,19 @@ tcti_device_get_poll_handles ( - return TSS2_TCTI_RC_BAD_CONTEXT; - } - -- if (handles == NULL || num_handles == NULL) { -+ if (num_handles == NULL) { - return TSS2_TCTI_RC_BAD_REFERENCE; - } - -+ if (handles != NULL && *num_handles < 1) { -+ return TSS2_TCTI_RC_INSUFFICIENT_BUFFER; -+ } -+ - *num_handles = 1; -- handles->fd = tcti_dev->fd; -+ if (handles != NULL) { -+ handles->fd = tcti_dev->fd; -+ } -+ - return TSS2_RC_SUCCESS; - #else - (void)(tctiContext); --- -2.27.0 - diff --git a/SOURCES/0001-tctildr-fix-segmentation-fault-if-name_conf-is-too-b.patch b/SOURCES/0001-tctildr-fix-segmentation-fault-if-name_conf-is-too-b.patch deleted file mode 100644 index 3a0f962..0000000 --- a/SOURCES/0001-tctildr-fix-segmentation-fault-if-name_conf-is-too-b.patch +++ /dev/null @@ -1,39 +0,0 @@ -From ffca561b2de43df0a9f7f9c0e717fca943f2c38b Mon Sep 17 00:00:00 2001 -From: Johannes Holland -Date: Tue, 20 Aug 2019 16:58:09 +0200 -Subject: [PATCH] tctildr: fix segmentation fault if name_conf is too big - -When strlen(name_conf) is too big and logging is set to at least DEBUG, -tctildr_conf_parse will cause a segmentation fault. This happens when -the unit tests are run with logging set to DEBUG. Hence, the logging -call has to be done after the check for strlen(name_conf). - -Signed-off-by: Johannes Holland ---- - src/tss2-tcti/tctildr.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/tss2-tcti/tctildr.c b/src/tss2-tcti/tctildr.c -index 76248f358860..ff967317b57b 100644 ---- a/src/tss2-tcti/tctildr.c -+++ b/src/tss2-tcti/tctildr.c -@@ -117,7 +117,6 @@ tctildr_conf_parse (const char *name_conf, - char *split; - size_t combined_length; - -- LOG_DEBUG ("name_conf: \"%s\"", name_conf); - if (name_conf == NULL) { - LOG_ERROR ("'name_conf' param may NOT be NULL"); - return TSS2_TCTI_RC_BAD_REFERENCE; -@@ -127,6 +126,8 @@ tctildr_conf_parse (const char *name_conf, - LOG_ERROR ("combined conf length must be between 0 and PATH_MAX"); - return TSS2_TCTI_RC_BAD_VALUE; - } -+ -+ LOG_DEBUG ("name_conf: \"%s\"", name_conf); - if (combined_length == 0) - return TSS2_RC_SUCCESS; - split = strchr (name_conf, ':'); --- -2.27.0 - diff --git a/SOURCES/0001-tctildr-remove-the-private-implementation-of-strndup.patch b/SOURCES/0001-tctildr-remove-the-private-implementation-of-strndup.patch deleted file mode 100644 index a62c8ac..0000000 --- a/SOURCES/0001-tctildr-remove-the-private-implementation-of-strndup.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 464da22b71e26421f55d4e8abc14711f89c89a28 Mon Sep 17 00:00:00 2001 -From: Tadeusz Struk -Date: Thu, 20 Feb 2020 14:11:43 -0800 -Subject: [PATCH] tctildr: remove the private implementation of strndup - -In fact the private implementation of strndup is only -needed for windows. - -Fixes: #1633 - -Signed-off-by: Tadeusz Struk ---- - configure.ac | 2 +- - src/tss2-tcti/tctildr.c | 37 +++++++++++++++++-------------------- - 2 files changed, 18 insertions(+), 21 deletions(-) - -diff --git a/configure.ac b/configure.ac -index d7724805966b..aa4ffb1b78a1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -45,7 +45,6 @@ case "${host_os}" in - esac - AC_SUBST([LIBSOCKET_LDFLAGS]) - --AC_CHECK_FUNCS([strndup]) - AC_ARG_ENABLE([unit], - [AS_HELP_STRING([--enable-unit], - [build cmocka unit tests])],, -@@ -65,6 +64,7 @@ AC_ARG_ENABLE([esapi], - - AM_CONDITIONAL(ESAPI, test "x$enable_esapi" = "xyes") - -+AC_CHECK_FUNC([strndup],[],[AC_MSG_ERROR([strndup function not found])]) - AC_ARG_ENABLE([tcti-device-async], - AS_HELP_STRING([--enable-tcti-device-async], - [Enable asynchronus operation on TCTI device -diff --git a/src/tss2-tcti/tctildr.c b/src/tss2-tcti/tctildr.c -index a46b301b3ea7..92af1d3a787d 100644 ---- a/src/tss2-tcti/tctildr.c -+++ b/src/tss2-tcti/tctildr.c -@@ -15,8 +15,25 @@ - #include - #elif defined(_MSC_VER) - #include -+#include - #ifndef PATH_MAX - #define PATH_MAX MAX_PATH -+ -+static char *strndup(const char* s, size_t n) -+{ -+ char *dst = NULL; -+ -+ if (n + 1 >= USHRT_MAX) -+ return NULL; -+ -+ dst = calloc(1, n + 1); -+ -+ if (dst == NULL) -+ return NULL; -+ -+ memcpy(dst, s, n); -+ return dst; -+} - #endif - #else - #include -@@ -268,26 +285,6 @@ Tss2_TctiLdr_Finalize (TSS2_TCTI_CONTEXT **tctiContext) - *tctiContext = NULL; - } - --#if !defined(HAVE_STRNDUP) --char* --strndup (const char* s, -- size_t n) --{ -- char* dst = NULL; -- -- if (n + 1 < n) { -- return NULL; -- } -- dst = calloc(1, n + 1); -- if (dst == NULL) { -- return NULL; -- } -- memcpy(dst, s, n); -- -- return dst; --} --#endif /* HAVE_STRNDUP */ -- - TSS2_RC - copy_info (const TSS2_TCTI_INFO *info_src, - TSS2_TCTI_INFO *info_dst) --- -2.30.1 - diff --git a/SOURCES/0001-tss2_rc-ensure-layer-number-is-in-bounds.patch b/SOURCES/0001-tss2_rc-ensure-layer-number-is-in-bounds.patch deleted file mode 100644 index e363b27..0000000 --- a/SOURCES/0001-tss2_rc-ensure-layer-number-is-in-bounds.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 79f62668a31a2da938f83d534a49ad7f9bc144ca Mon Sep 17 00:00:00 2001 -From: William Roberts -Date: Thu, 19 Jan 2023 11:53:06 -0600 -Subject: [PATCH] tss2_rc: ensure layer number is in bounds - -The layer handler array was defined as 255, the max number of uint8, -which is the size of the layer field, however valid values are 0-255 -allowing for 256 possibilities and thus the array was off by one and -needed to be sized to 256 entries. Update the size and add tests. - -Note: previous implementations incorrectly dropped bits on unknown error -output, ie TSS2_RC of 0xFFFFFF should yeild a string of 255:0xFFFFFF, -but earlier implementations returned 255:0xFFFF, dropping the middle -bits, this patch fixes that. - -Fixes: CVE-2023-22745 - -Signed-off-by: William Roberts ---- - src/tss2-rc/tss2_rc.c | 31 +++++++++++++++++++++---------- - test/unit/test_tss2_rc.c | 21 ++++++++++++++++++++- - 2 files changed, 41 insertions(+), 11 deletions(-) - -diff --git a/src/tss2-rc/tss2_rc.c b/src/tss2-rc/tss2_rc.c -index 93743048..0a64958f 100644 ---- a/src/tss2-rc/tss2_rc.c -+++ b/src/tss2-rc/tss2_rc.c -@@ -1,5 +1,8 @@ - /* SPDX-License-Identifier: BSD-2-Clause */ -- -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+#include - #include - #include - #include -@@ -777,7 +780,7 @@ sys_err_handler (TSS2_RC rc) - static struct { - char name[TSS2_ERR_LAYER_NAME_MAX]; - TSS2_RC_HANDLER handler; --} layer_handler[TPM2_ERROR_TSS2_RC_LAYER_COUNT] = { -+} layer_handler[TPM2_ERROR_TSS2_RC_LAYER_COUNT + 1] = { - ADD_HANDLER("tpm" , tpm2_ehandler), - ADD_NULL_HANDLER, /* layer 1 is unused */ - ADD_NULL_HANDLER, /* layer 2 is unused */ -@@ -812,7 +815,7 @@ unknown_layer_handler(TSS2_RC rc) - static __thread char buf[32]; - - clearbuf(buf); -- catbuf(buf, "0x%X", tpm2_error_get(rc)); -+ catbuf(buf, "0x%X", rc); - - return buf; - } -@@ -909,19 +912,27 @@ Tss2_RC_Decode(TSS2_RC rc) - catbuf(buf, "%u:", layer); - } - -- handler = !handler ? unknown_layer_handler : handler; -- - /* - * Handlers only need the error bits. This way they don't - * need to concern themselves with masking off the layer - * bits or anything else. - */ -- UINT16 err_bits = tpm2_error_get(rc); -- const char *e = err_bits ? handler(err_bits) : "success"; -- if (e) { -- catbuf(buf, "%s", e); -+ if (handler) { -+ UINT16 err_bits = tpm2_error_get(rc); -+ const char *e = err_bits ? handler(err_bits) : "success"; -+ if (e) { -+ catbuf(buf, "%s", e); -+ } else { -+ catbuf(buf, "0x%X", err_bits); -+ } - } else { -- catbuf(buf, "0x%X", err_bits); -+ /* -+ * we don't want to drop any bits if we don't know what to do with it -+ * so drop the layer byte since we we already have that. -+ */ -+ const char *e = unknown_layer_handler(rc >> 8); -+ assert(e); -+ catbuf(buf, "%s", e); - } - - return buf; -diff --git a/test/unit/test_tss2_rc.c b/test/unit/test_tss2_rc.c -index 1c8d66c9..9369beda 100644 ---- a/test/unit/test_tss2_rc.c -+++ b/test/unit/test_tss2_rc.c -@@ -198,7 +198,7 @@ test_custom_handler(void **state) - * Test an unknown layer - */ - e = Tss2_RC_Decode(rc); -- assert_string_equal(e, "1:0x2A"); -+ assert_string_equal(e, "1:0x100"); - } - - static void -@@ -281,6 +281,23 @@ test_tcti(void **state) - assert_string_equal(e, "tcti:Fails to connect to next lower layer"); - } - -+static void -+test_all_FFs(void **state) -+{ -+ (void) state; -+ -+ const char *e = Tss2_RC_Decode(0xFFFFFFFF); -+ assert_string_equal(e, "255:0xFFFFFF"); -+} -+ -+static void -+test_all_FFs_set_handler(void **state) -+{ -+ (void) state; -+ Tss2_RC_SetHandler(0xFF, "garbage", custom_err_handler); -+ Tss2_RC_SetHandler(0xFF, NULL, NULL); -+} -+ - /* link required symbol, but tpm2_tool.c declares it AND main, which - * we have a main below for cmocka tests. - */ -@@ -312,6 +329,8 @@ main(int argc, char* argv[]) - cmocka_unit_test(test_esys), - cmocka_unit_test(test_mu), - cmocka_unit_test(test_tcti), -+ cmocka_unit_test(test_all_FFs), -+ cmocka_unit_test(test_all_FFs_set_handler) - }; - - return cmocka_run_group_tests(tests, NULL, NULL); --- -2.40.1 - diff --git a/SOURCES/0002-esys-Shared-secret-calculation-is-not-spec-compliant.patch b/SOURCES/0002-esys-Shared-secret-calculation-is-not-spec-compliant.patch deleted file mode 100644 index 81a7e20..0000000 --- a/SOURCES/0002-esys-Shared-secret-calculation-is-not-spec-compliant.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b94392537a1ed43918483a2bfa8a90e5fd05354d Mon Sep 17 00:00:00 2001 -From: Stefan Thom -Date: Fri, 5 Jun 2020 12:11:39 -0700 -Subject: [PATCH 2/4] esys: Shared secret calculation is not spec compliant. - -Refer to specification part 1 Architecture, Section 20.1 AuditSession -Introduction: If the session was bound when created (see 19.6.10 and -19.6.12), the bind value is lost and any further use of the session for -authorization will require that the authValue be used in the HMAC. - -Signed-off-by: Stefan Thom ---- - src/tss2-esys/esys_tr.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/tss2-esys/esys_tr.c b/src/tss2-esys/esys_tr.c -index c9ea537a..d14c7d35 100644 ---- a/src/tss2-esys/esys_tr.c -+++ b/src/tss2-esys/esys_tr.c -@@ -511,6 +511,8 @@ Esys_TRSess_SetAttributes(ESYS_CONTEXT * esys_context, ESYS_TR esys_handle, - esys_object->rsrc.misc.rsrc_session.sessionAttributes = - (esys_object->rsrc.misc.rsrc_session. - sessionAttributes & ~mask) | (flags & mask); -+ if (esys_object->rsrc.misc.rsrc_session.sessionAttributes & TPMA_SESSION_AUDIT) -+ esys_object->rsrc.misc.rsrc_session.bound_entity.size = 0; - return TSS2_RC_SUCCESS; - } - --- -2.41.0 - diff --git a/SOURCES/0003-esys_iutil.c-Fix-issue-where-nonceTPM-was-included-t.patch b/SOURCES/0003-esys_iutil.c-Fix-issue-where-nonceTPM-was-included-t.patch deleted file mode 100644 index 7956601..0000000 --- a/SOURCES/0003-esys_iutil.c-Fix-issue-where-nonceTPM-was-included-t.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7a56b84b5990b07efd30b5bf79331c74d28df954 Mon Sep 17 00:00:00 2001 -From: Imran Desai -Date: Mon, 22 Mar 2021 16:43:36 -0700 -Subject: [PATCH 3/4] esys_iutil.c: Fix issue where nonceTPM was included twice - in hmac - -Fixes #2037 - -TPM2.0 Architecture 19.6.5 Note 7 - -If the same session (not the first session) is used for decrypt and -encrypt, its nonceTPM is only used once. If different sessions are -used for decrypt and encrypt, both nonceTPMs are included. - -Signed-off-by: Imran Desai ---- - src/tss2-esys/esys_iutil.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/tss2-esys/esys_iutil.c b/src/tss2-esys/esys_iutil.c -index 08a9b7df..1910c570 100644 ---- a/src/tss2-esys/esys_iutil.c -+++ b/src/tss2-esys/esys_iutil.c -@@ -1265,6 +1265,18 @@ iesys_gen_auths(ESYS_CONTEXT * esys_context, - &encryptNonce); - return_if_error(r, "More than one crypt session"); - -+ /* -+ * TPM2.0 Architecture 19.6.5 Note 7 -+ * -+ * If the same session (not the first session) is used for decrypt and -+ * encrypt, its nonceTPM is only used once. If different sessions are used -+ * for decrypt and encrypt, both nonceTPMs are included -+ */ -+ if (decryptNonceIdx && (decryptNonceIdx == encryptNonceIdx)) { -+ decryptNonceIdx = 0; -+ } -+ -+ - /* Compute cp hash values for command buffer for all used algorithms */ - - r = iesys_compute_cp_hashtab(esys_context, --- -2.41.0 - diff --git a/SOURCES/0004-ESYS-Fix-buffer-overflow-in-xor-parameter-obfuscatio.patch b/SOURCES/0004-ESYS-Fix-buffer-overflow-in-xor-parameter-obfuscatio.patch deleted file mode 100644 index ffd947b..0000000 --- a/SOURCES/0004-ESYS-Fix-buffer-overflow-in-xor-parameter-obfuscatio.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3a540d570d265c80dca31bfec23d267cdfa1c294 Mon Sep 17 00:00:00 2001 -From: Juergen Repp -Date: Mon, 12 Jul 2021 10:52:53 +0200 -Subject: [PATCH 4/4] ESYS: Fix buffer overflow in xor parameter obfuscation. - -If trace is activated LOGBLOB_TRACE is called with a wrong pointer to display -the obfuscated data. Fixes #2115. - -Signed-off-by: Juergen Repp ---- - src/tss2-esys/esys_crypto.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/tss2-esys/esys_crypto.c b/src/tss2-esys/esys_crypto.c -index aef3e50b..a2b7b937 100644 ---- a/src/tss2-esys/esys_crypto.c -+++ b/src/tss2-esys/esys_crypto.c -@@ -499,6 +499,7 @@ iesys_xor_parameter_obfuscation(TPM2_ALG_ID hash_alg, - size_t data_size_bits = data_size * 8; - size_t rest_size = data_size; - BYTE *kdfa_byte_ptr; -+ BYTE *data_start = data; - - if (key == NULL || data == NULL) { - LOG_ERROR("Bad reference"); -@@ -514,11 +515,11 @@ iesys_xor_parameter_obfuscation(TPM2_ALG_ID hash_alg, - return_if_error(r, "iesys_crypto_KDFa failed"); - /* XOR next data sub block with KDFa result */ - kdfa_byte_ptr = kdfa_result; -- LOGBLOB_TRACE(data, data_size, "Parameter data before XOR"); -+ LOGBLOB_TRACE(data_start, data_size, "Parameter data before XOR"); - for(size_t i = digest_size < rest_size ? digest_size : rest_size; i > 0; - i--) - *data++ ^= *kdfa_byte_ptr++; -- LOGBLOB_TRACE(data, data_size, "Parameter data after XOR"); -+ LOGBLOB_TRACE(data_start, data_size, "Parameter data after XOR"); - rest_size = rest_size < digest_size ? 0 : rest_size - digest_size; - } - return TSS2_RC_SUCCESS; --- -2.41.0 - diff --git a/SPECS/tpm2-tss.spec b/SPECS/tpm2-tss.spec deleted file mode 100644 index 10dd101..0000000 --- a/SPECS/tpm2-tss.spec +++ /dev/null @@ -1,239 +0,0 @@ -Name: tpm2-tss -Version: 2.3.2 -Release: 6%{?dist} -Summary: TPM2.0 Software Stack - -# The entire source code is under BSD except implementation.h and tpmb.h which -# is under TCGL(Trusted Computing Group License). -License: BSD -URL: https://github.com/tpm2-software/tpm2-tss -Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz -# patch submitted upstream https://github.com/tpm2-software/tpm2-tss/pull/1707 -Patch0: 0001-man-Clean-up-libmandoc-parser-warnings.patch -# Upstream patches -Patch1: 0001-esys-Check-object-handle-node-before-calling-compute.patch -Patch2: 0001-build-update-exported-symbols-map-for-libtss2-mu.patch -Patch3: 0001-esys-fix-Esys_StartAuthSession-called-with-optional-.patch -Patch4: 0001-esys-fixup-compute_encrypted_salt-err-handling-in-Es.patch -Patch5: 0001-esys-zero-out-ctx-salt-after-on-startAuthSession_fin.patch -Patch6: 0001-mu-Remove-use-of-VLAs-for-Marshalling-TPML-types.patch -Patch7: 0001-esys_iutil-use-memcmp-in-byte-array-comparison.patch -Patch8: 0001-tcti-device-getPollHandles-should-allow-num_handles-.patch -Patch9: 0001-tctildr-fix-segmentation-fault-if-name_conf-is-too-b.patch -Patch10: 0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch -Patch11: 0001-Esys_CreateLoaded-fix-resource-name-calculation.patch -Patch12: 0001-sys-match-counter-variable-type-for-cmdAuthsArray-co.patch -Patch13: 0001-Return-proper-error-code-on-memory-allocation-failur.patch -Patch14: 0001-esys-fix-hmac-calculation-for-tpm2_clear-command.patch -Patch15: 0001-tctildr-remove-the-private-implementation-of-strndup.patch -Patch16: 0001-tss2_rc-ensure-layer-number-is-in-bounds.patch -Patch17: 0001-ESYS-Fix-initialization-of-app-data-in-Esys_Initiali.patch -Patch18: 0002-esys-Shared-secret-calculation-is-not-spec-compliant.patch -Patch19: 0003-esys_iutil.c-Fix-issue-where-nonceTPM-was-included-t.patch -Patch20: 0004-ESYS-Fix-buffer-overflow-in-xor-parameter-obfuscatio.patch - -%global udevrules_prefix 60- - -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: doxygen -BuildRequires: autoconf-archive -BuildRequires: libtool -BuildRequires: pkgconfig -BuildRequires: systemd -BuildRequires: libgcrypt-devel -BuildRequires: openssl-devel -Requires(pre): shadow-utils - -%description -tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system -APIs. It sits between TPM driver and applications, providing TPM2.0 specified -APIs for applications to access TPM module through kernel TPM drivers. - -%prep -%autosetup -p1 -n %{name}-%{version} - -%build -# Use built-in tpm-udev.rules, with specified installation path and prefix. -%configure --disable-static --disable-silent-rules --with-udevrulesdir=%{_udevrulesdir} --with-udevrulesprefix=%{udevrules_prefix} - -# This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -%make_build - -%install -%make_install -find %{buildroot}%{_libdir} -type f -name \*.la -delete - -%pre -getent group tss >/dev/null || groupadd -f -g 59 -r tss -if ! getent passwd tss >/dev/null ; then - if ! getent passwd 59 >/dev/null ; then - useradd -r -u 59 -g tss -d / -s /sbin/nologin -c "Account used for TPM access" tss - else - useradd -r -g tss -d / -s /sbin/nologin -c "Account used for TPM access" tss - fi -fi -exit 0 - -%files -%doc README.md CHANGELOG.md -%license LICENSE -%{_libdir}/libtss2-mu.so.* -%{_libdir}/libtss2-sys.so.* -%{_libdir}/libtss2-esys.so.* -%{_libdir}/libtss2-rc.so.* -%{_libdir}/libtss2-tctildr.so.* -%{_libdir}/libtss2-tcti-device.so.* -%{_libdir}/libtss2-tcti-mssim.so.* -%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules - - -%package devel -Summary: Headers and libraries for building apps that use tpm2-tss -Requires: %{name}%{_isa} = %{version}-%{release} - -%description devel -This package contains headers and libraries required to build applications that -use tpm2-tss. - -%files devel -%{_includedir}/tss2/ -%{_libdir}/libtss2-mu.so -%{_libdir}/libtss2-sys.so -%{_libdir}/libtss2-esys.so -%{_libdir}/libtss2-rc.so -%{_libdir}/libtss2-tctildr.so -%{_libdir}/libtss2-tcti-default.so -%{_libdir}/libtss2-tcti-device.so -%{_libdir}/libtss2-tcti-mssim.so -%{_libdir}/pkgconfig/tss2-mu.pc -%{_libdir}/pkgconfig/tss2-sys.pc -%{_libdir}/pkgconfig/tss2-esys.pc -%{_libdir}/pkgconfig/tss2-rc.pc -%{_libdir}/pkgconfig/tss2-tctildr.pc -%{_libdir}/pkgconfig/tss2-tcti-device.pc -%{_libdir}/pkgconfig/tss2-tcti-mssim.pc -%{_mandir}/man3/*.3.gz -%{_mandir}/man7/tss2*.7.gz - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%changelog -* Wed Oct 18 2023 Štěpán Horáček - 2.3.2-6 -- Fix home directory of the tss user - Related: RHEL-14439 - -* Wed Jun 7 2023 Štěpán Horáček - 2.3.2-5 -- Ensure layer number is in bounds - Resolves: rhbz#2160302 - Resolves: rhbz#2162611 - -* Tue Apr 20 2021 Jerry Snitselaar - 2.3.2-4 -- Fix hmac calculation for tpm2_clear command. -- Remove private implementation of strndup. -resolves: rhbz#1920825 rhbz#1940861 - -* Mon Nov 16 2020 Jerry Snitselaar - 2.3.2-3 -- Add tss user if doesn't exist. -- Update exported symbols map for libtss2-mu -- esys: Check object handle node before calling compute_session_value -- esys: fix resource name calculation -- esys: fix Esys_StartAuthSession called with optional params -- esys: fix keysize of ECC curve TPM2_ECC_NISTP224 -- esys: fixup compute_encrypted_salt error handling -- esys: use memcmp in byte array comparison -- esys: zero out ctx->salt after startAuthSession_finish -- mu: Remove use of VLAs for Marshalling TPML types -- return proper error code on memory allocation failure -- sys: match counter variable type for cmdAuthsArray->count -- tcti-device: getPollHandles should allow num_handles query -- tctildr: fix segmentation fault if name_conf is too big -resolves: rhbz#1879071 rhbz#1855180 - -* Mon Apr 27 2020 Jerry Snitselaar - 2.3.2-2 -- Clean up libmandoc parser errors. -resolves: rhbz#1789684 - -* Thu Feb 20 2020 Jerry Snitselaar - 2.3.2-1 -- Update to 2.3.2 release -resolves: rhbz#1789684 - -* Tue May 28 2019 Jerry Snitselaar - 2.0.0-5 -- Add CI gating support -resolves: rhbz#1682418 - -* Mon Jul 23 2018 Jerry Snitselaar - 2.0.0-4 -- Remove TCGL from spec license list. - -* Sat Jul 14 2018 Fedora Release Engineering - 2.0.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Jul 4 2018 Yunying Sun - 2.0.0-2 -- Re-enable ESAPI since gcrypt dependency is not an issue for Fedora -- Bump release version to 2.0.0-2 - -* Mon Jul 2 2018 Yunying Sun - 2.0.0-1 -- Update to 2.0.0 release (RHBZ#1508870) -- Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead -- Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0 -- Add scriptlet to fix Rpath errors -- Update file installation paths and names accordingly - -* Sun Mar 04 2018 Javier Martinez Canillas - 1.4.0-1 -- Update URLs to point to the new project location -- Add README.md CHANGELOG.md to %%files directive -- Update to 1.4.0 release (RHBZ#1508870) - -* Fri Feb 23 2018 Javier Martinez Canillas - 1.3.0-4 -- Install udev rule for TPM character devices - -* Wed Feb 21 2018 Javier Martinez Canillas - 1.3.0-3 -- Remove ExclusiveArch: %%{ix86} x86_64 directive - -* Fri Feb 09 2018 Igor Gnatenko - 1.3.0-2 -- Escape macros in %%changelog - -* Fri Dec 08 2017 Javier Martinez Canillas - 1.3.0-1 -- Update to 1.3.0 release - -* Wed Nov 29 2017 Javier Martinez Canillas - 1.3.0-0.1.rc2 -- Update to 1.3.0 release candidate 2 (RHBZ#1508870) -- Remove global pkg_prefix since now the upstream repo and package names match -- Update URLs to point to the new project location -- Remove -Wno-int-in-bool-context compiler flag since now upstream takes care -- Remove %%doc directive since README.md and CHANGELOG.md are not in the tarball -- Add patch to include a LICENSE since the generated tarball does not have it - -* Mon Aug 28 2017 Javier Martinez Canillas - 1.2.0-1 -- Update to 1.2.0 release -- Use tpm2-tss instead of TPM2.0-TSS as prefix since project name changed -- Fix SPEC file access mode -- Include new man pages in %%files directive - -* Fri Aug 18 2017 Javier Martinez Canillas - 1.1.0-3 -- Remove unneeded source tarballs (RHBZ#1482828) - -* Thu Aug 03 2017 Fedora Release Engineering - 1.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Sun Yunying - 1.1.0-1 -- Update to 1.1.0 release - -* Sat Feb 11 2017 Fedora Release Engineering - 1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Dec 12 2016 Sun Yunying - 1.0-2 -- Remove global macro pkg_version to avoid duplicate of version -- Use ExclusiveArch instead of ExcludeArch -- Use less wildcard in %%files section to be more specific -- Add trailing slash at end of added directory in %%file section -- Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires -- Increase release version to 2 - -* Fri Dec 2 2016 Sun Yunying - 1.0-1 -- Initial version of the package diff --git a/sources b/sources new file mode 100644 index 0000000..7dee31f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (tpm2-tss-4.1.3.tar.gz) = c9a5e1e90f6545a466d43790ab2d67c52c4b788a0b21f8212575e27e04e0ac663105863fe00824e08a4e56a4f8c6b00c48c1a1c132531b8569cd5042c3bb9e69 diff --git a/tpm2-tss-3.0.0-doxygen.patch b/tpm2-tss-3.0.0-doxygen.patch new file mode 100644 index 0000000..2f82472 --- /dev/null +++ b/tpm2-tss-3.0.0-doxygen.patch @@ -0,0 +1,15 @@ +diff -up tpm2-tss-3.0.0/Doxyfile.in.me tpm2-tss-3.0.0/Doxyfile.in +--- tpm2-tss-3.0.0/Doxyfile.in.me 2020-09-15 20:24:26.463314644 +0200 ++++ tpm2-tss-3.0.0/Doxyfile.in 2020-09-15 20:26:29.010866650 +0200 +@@ -947,7 +947,10 @@ EXCLUDE_PATTERNS = + # Note that the wildcards are matched against the file with absolute path, so to + # exclude all test directories use the pattern */test/* + +-EXCLUDE_SYMBOLS = *_IN IESYS_CMD_IN_PARAM ++EXCLUDE_SYMBOLS = StartAuthSession_IN CreatePrimary_IN ContextSave_IN ContextLoad_IN \ ++ Load_IN LoadExternal_IN CreateLoaded_IN EvictControl_IN HMAC_Start_IN \ ++ HierarchyChangeAuth_IN SequenceComplete_IN Policy_IN NV_IN FlushContext_IN \ ++ IESYS_CMD_IN_PARAM + + # The EXAMPLE_PATH tag can be used to specify one or more files or directories + # that contain example code fragments that are included (see the \include diff --git a/tpm2-tss-systemd-sysusers.conf b/tpm2-tss-systemd-sysusers.conf new file mode 100644 index 0000000..bf66465 --- /dev/null +++ b/tpm2-tss-systemd-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u tss 59 "Account used for TPM access" - - diff --git a/tpm2-tss.spec b/tpm2-tss.spec new file mode 100644 index 0000000..98b564b --- /dev/null +++ b/tpm2-tss.spec @@ -0,0 +1,389 @@ +%bcond_with rc +%if %{with rc} +%global candidate rc2 +%endif + +Name: tpm2-tss +Version: 4.1.3 +Release: 5%{?candidate:.%{candidate}}%{?dist} +Summary: TPM2.0 Software Stack + +# The entire source code is under BSD except implementation.h and tpmb.h which +# is under TCGL(Trusted Computing Group License). +License: BSD-2-Clause +URL: https://github.com/tpm2-software/tpm2-tss +Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz +Source1: tpm2-tss-systemd-sysusers.conf +# doxygen crash +Patch0: tpm2-tss-3.0.0-doxygen.patch +Patch1: 0001-Remove-OpenSSL-engine-API-dependency.patch + +%global udevrules_prefix 60- + +%if %{with rc} +BuildRequires: autoconf +BuildRequires: autoconf-archive +BuildRequires: automake +BuildRequires: libtool +%endif +BuildRequires: make +BuildRequires: doxygen +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: json-c-devel +BuildRequires: libcurl-devel +BuildRequires: libgcrypt-devel +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +BuildRequires: libuuid-devel +Requires(pre): shadow-utils + +%description +tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system +APIs. It sits between TPM driver and applications, providing TPM2.0 specified +APIs for applications to access TPM module through kernel TPM drivers. + +%package fapi +Summary: High-level TPM2.0 Software Stack +Requires: %{name}%{_isa} = %{version}-%{release} + +%description fapi +tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system +APIs. It sits between TPM driver and applications, providing TPM2.0 specified +APIs for applications to access TPM module through kernel TPM drivers. + +This package provides the high-level "Feature API" library. + +%prep +%autosetup -n %{name}-%{version}%{?candidate:-%{candidate}} -p1 + +%build +# Use built-in tpm-udev.rules, with specified installation path and prefix. +%configure --disable-static --disable-silent-rules \ + --with-udevrulesdir=%{_udevrulesdir} --with-udevrulesprefix=%{udevrules_prefix} \ + --with-runstatedir=%{_rundir} --with-tmpfilesdir=%{_tmpfilesdir} --with-sysusersdir=%{_sysusersdir} + +# This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%make_build + +%install +%make_install +find %{buildroot}%{_libdir} -type f -name \*.la -delete +rm %{buildroot}%{_sysusersdir}/tpm2-tss.conf +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/tpm2-tss.conf + +%pre +%sysusers_create_compat %{SOURCE1} +exit 0 + +%ldconfig_scriptlets + +%files +%doc README.md CHANGELOG.md +%license LICENSE +%{_sysconfdir}/tpm2-tss/ +%{_libdir}/libtss2-mu.so.0* +%{_libdir}/libtss2-sys.so.1* +%{_libdir}/libtss2-esys.so.0* +%{_libdir}/libtss2-policy.so.0* +%{_libdir}/libtss2-rc.so.0* +%{_libdir}/libtss2-tctildr.so.0* +%{_libdir}/libtss2-tcti-cmd.so.0* +%{_libdir}/libtss2-tcti-device.so.0* +%{_libdir}/libtss2-tcti-mssim.so.0* +%{_libdir}/libtss2-tcti-pcap.so.0* +%{_libdir}/libtss2-tcti-spi-helper.so.0* +%{_libdir}/libtss2-tcti-swtpm.so.0* +%{_libdir}/libtss2-tcti-i2c-helper.so.0* +%{_libdir}/libtss2-tcti-spidev.so.0* +%{_sysusersdir}/tpm2-tss.conf +%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules + +%files fapi +%{_libdir}/libtss2-fapi.so.1* +%{_tmpfilesdir}/tpm2-tss-fapi.conf + +%package devel +Summary: Headers and libraries for building apps that use tpm2-tss +Requires: %{name}%{_isa} = %{version}-%{release} +Requires: %{name}-fapi%{_isa} = %{version}-%{release} + +%description devel +This package contains headers and libraries required to build applications that +use tpm2-tss. + +%files devel +%{_includedir}/tss2/ +%{_libdir}/libtss2-mu.so +%{_libdir}/libtss2-sys.so +%{_libdir}/libtss2-esys.so +%{_libdir}/libtss2-fapi.so +%{_libdir}/libtss2-policy.so +%{_libdir}/libtss2-rc.so +%{_libdir}/libtss2-tctildr.so +%{_libdir}/libtss2-tcti-cmd.so +%{_libdir}/libtss2-tcti-device.so +%{_libdir}/libtss2-tcti-mssim.so +%{_libdir}/libtss2-tcti-pcap.so +%{_libdir}/libtss2-tcti-spi-helper.so +%{_libdir}/libtss2-tcti-swtpm.so +%{_libdir}/libtss2-tcti-i2c-helper.so +%{_libdir}/libtss2-tcti-spidev.so +%{_libdir}/pkgconfig/tss2-mu.pc +%{_libdir}/pkgconfig/tss2-sys.pc +%{_libdir}/pkgconfig/tss2-esys.pc +%{_libdir}/pkgconfig/tss2-fapi.pc +%{_libdir}/pkgconfig/tss2-policy.pc +%{_libdir}/pkgconfig/tss2-rc.pc +%{_libdir}/pkgconfig/tss2-tctildr.pc +%{_libdir}/pkgconfig/tss2-tcti-cmd.pc +%{_libdir}/pkgconfig/tss2-tcti-device.pc +%{_libdir}/pkgconfig/tss2-tcti-mssim.pc +%{_libdir}/pkgconfig/tss2-tcti-pcap.pc +%{_libdir}/pkgconfig/tss2-tcti-spi-helper.pc +%{_libdir}/pkgconfig/tss2-tcti-swtpm.pc +%{_libdir}/pkgconfig/tss2-tcti-i2c-helper.pc +%{_libdir}/pkgconfig/tss2-tcti-spidev.pc +%{_mandir}/man3/*.3.gz +%{_mandir}/man5/*.5.gz +%{_mandir}/man7/tss2*.7.gz + + +%changelog +* Tue Oct 29 2024 Troy Dawson - 4.1.3-5 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Fri Oct 11 2024 Štěpán Horáček - 4.1.3-4 +- Version bump +- Resolves: RHEL-54173 + +* Thu Oct 3 2024 Štěpán Horáček - 4.1.3-3 +- Remove OpenSSL engine API dependency +- Resolves: RHEL-54173 + +* Mon Jun 24 2024 Troy Dawson - 4.1.3-2 +- Bump release for June 2024 mass rebuild + +* Tue May 14 2024 Štěpán Horáček - 4.1.3-1 +- Update to 4.1.3 + Resolves: RHEL-23207 + +* Sat Jan 27 2024 Fedora Release Engineering - 4.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Dec 2 2023 Zbigniew Jedrzejewski-Szmek - 4.0.1-6 +- Split out fapi subpackage + Resolves: rhbz#2252535 + +* Tue Sep 26 2023 Štěpán Horáček - 4.0.1-5 +- Migrate license to SPDX + +* Sat Jul 22 2023 Fedora Release Engineering - 4.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 25 2023 Peter Robinson - 4.0.1-3 +- Update to 4.0.1 - fixes CVE-2023-22745 + +* Sat Jan 21 2023 Fedora Release Engineering - 4.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jan 04 2023 Peter Robinson - 4.0.0-1 +- Update to 4.0.0 + +* Mon Dec 19 2022 Peter Robinson - 4.0.0-0.1.rc2 +- Update to 4.0.0 RC2 + +* Mon Dec 19 2022 Peter Robinson - 3.2.1-1 +- Update to 3.2.1 + +* Wed Jul 27 2022 Luca BRUNO - 3.2.0-3 +- Align sysusers.d configuration to Fedora user/group allocation + Resolves: rhbz#2103683 + +* Sat Jul 23 2022 Fedora Release Engineering - 3.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Feb 19 2022 Peter Robinson - 3.2.0-1 +- Update to 3.2.0 + +* Fri Feb 18 2022 Peter Robinson - 3.2.0-0.5.rc3 +- Update to 3.2.0-rc3 + +* Mon Feb 14 2022 Peter Robinson - 3.2.0-0.4.rc1 +- Update to 3.2.0-rc1 + +* Tue Feb 08 2022 Peter Robinson - 3.2.0-0.3.rc0 +- Add conditionals for RC builds + +* Sat Jan 22 2022 Fedora Release Engineering - 3.2.0-0.2.rc0 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 14 2022 Peter Robinson - 3.2.0-0.1.rc0 +- Update to 3.2.0-rc0 (fixes rhbz#2008179) + +* Tue Sep 14 2021 Sahana Prasad - 3.1.0-4 +- Rebuilt with OpenSSL 3.0.0 + +* Fri Jul 23 2021 Fedora Release Engineering - 3.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sat Jul 10 2021 Björn Esser - 3.1.0-2 +- Rebuild for versioned symbols in json-c + +* Mon May 17 2021 Peter Robinson - 3.1.0-1 +- Update to 3.1.0 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Nov 26 2020 Peter Robinson - 3.0.3-1 +- Update to 3.0.2 + +* Sun Nov 22 2020 Peter Robinson - 3.0.2-1 +- Update to 3.0.2 + +* Wed Sep 23 2020 Peter Robinson - 3.0.1-1 +- Update to 3.0.1 + +* Tue Sep 15 2020 Than Ngo - 3.0.0-4 +- Fix doxygen crash + +* Tue Sep 15 2020 Peter Robinson - 3.0.0-3 +- Create tss user, if it doesn't exist, for userspace TPM access + +* Fri Aug 07 2020 Peter Robinson - 3.0.0-2 +- Install sysusers config in sysusersdir (rhbz #1834519) + +* Wed Aug 05 2020 Peter Robinson - 3.0.0-1 +- Update to 3.0.0 + +* Wed Aug 05 2020 Peter Robinson - 2.4.2-1 +- Update to 2.4.2 + +* Wed Jul 29 2020 Fedora Release Engineering - 2.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu May 14 2020 Peter Robinson - 2.4.1-1 +- Update to 2.4.1 + +* Fri May 08 2020 Paul Wouters - 2.4.0-3 +- Use proper rundir and tmpfiles macros so proper directories are used + +* Tue Apr 21 2020 Björn Esser - 2.4.0-2 +- Rebuild (json-c) + +* Thu Mar 12 2020 Peter Robinson - 2.4.0-1 +- Update to 2.4.0 release + +* Mon Feb 24 2020 Peter Robinson - 2.3.3-1 +- Update to 2.3.3 release + +* Fri Jan 31 2020 Fedora Release Engineering - 2.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Dec 13 2019 Yunying Sun - 2.3.2-1 +- Update to 2.3.2 release + +* Fri Sep 6 2019 Yunying Sun - 2.3.1-1 +- Update to 2.3.1 release + +* Thu Aug 15 2019 Yunying Sun - 2.3.0-1 +- Update to 2.3.0 release + +* Sat Jul 27 2019 Fedora Release Engineering - 2.2.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed May 29 2019 Yunying Sun - 2.2.3-1 +- Update to 2.2.3 release + +* Fri Mar 29 2019 Yunying Sun - 2.2.2-1 +- Update to 2.2.2 release + +* Mon Mar 4 2019 Peter Robinson 2.2.1-1 +- Update to 2.2.1 release + +* Wed Feb 06 2019 Javier Martinez Canillas - 2.2.0-1 +- Update to 2.2.0 release + +* Sun Feb 03 2019 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Oct 10 2018 Yunying Sun - 2.1.0-1 +- Update to 2.1.0 release + +* Thu Aug 30 2018 Yunying Sun - 2.0.1-1 +- Update to 2.0.1 release + +* Sat Jul 14 2018 Fedora Release Engineering - 2.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jul 4 2018 Yunying Sun - 2.0.0-2 +- Re-enable ESAPI since gcrypt dependency is not an issue for Fedora +- Bump release version to 2.0.0-2 + +* Mon Jul 2 2018 Yunying Sun - 2.0.0-1 +- Update to 2.0.0 release (RHBZ#1508870) +- Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead +- Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0 +- Add scriptlet to fix Rpath errors +- Update file installation paths and names accordingly + +* Sun Mar 04 2018 Javier Martinez Canillas - 1.4.0-1 +- Update URLs to point to the new project location +- Add README.md CHANGELOG.md to %%files directive +- Update to 1.4.0 release (RHBZ#1508870) + +* Fri Feb 23 2018 Javier Martinez Canillas - 1.3.0-4 +- Install udev rule for TPM character devices + +* Wed Feb 21 2018 Javier Martinez Canillas - 1.3.0-3 +- Remove ExclusiveArch: %%{ix86} x86_64 directive + +* Fri Feb 09 2018 Igor Gnatenko - 1.3.0-2 +- Escape macros in %%changelog + +* Fri Dec 08 2017 Javier Martinez Canillas - 1.3.0-1 +- Update to 1.3.0 release + +* Wed Nov 29 2017 Javier Martinez Canillas - 1.3.0-0.1.rc2 +- Update to 1.3.0 release candidate 2 (RHBZ#1508870) +- Remove global pkg_prefix since now the upstream repo and package names match +- Update URLs to point to the new project location +- Remove -Wno-int-in-bool-context compiler flag since now upstream takes care +- Remove %%doc directive since README.md and CHANGELOG.md are not in the tarball +- Add patch to include a LICENSE since the generated tarball does not have it + +* Mon Aug 28 2017 Javier Martinez Canillas - 1.2.0-1 +- Update to 1.2.0 release +- Use tpm2-tss instead of TPM2.0-TSS as prefix since project name changed +- Fix SPEC file access mode +- Include new man pages in %%files directive + +* Fri Aug 18 2017 Javier Martinez Canillas - 1.1.0-3 +- Remove unneeded source tarballs (RHBZ#1482828) + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Sun Yunying - 1.1.0-1 +- Update to 1.1.0 release + +* Sat Feb 11 2017 Fedora Release Engineering - 1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 12 2016 Sun Yunying - 1.0-2 +- Remove global macro pkg_version to avoid duplicate of version +- Use ExclusiveArch instead of ExcludeArch +- Use less wildcard in %%files section to be more specific +- Add trailing slash at end of added directory in %%file section +- Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires +- Increase release version to 2 + +* Fri Dec 2 2016 Sun Yunying - 1.0-1 +- Initial version of the package