@@ -848,7 +848,11 @@ int wolfBoot_seal_auth(const uint8_t* pubkey_hint,
848848
849849 rc = wolfBoot_store_blob (TPM_RH_PLATFORM ,
850850 WOLFBOOT_TPM_SEAL_NV_BASE + index ,
851- nvAttributes , & seal_blob , auth , authSz
851+ nvAttributes , & seal_blob ,
852+ /* do not use NV auth to store blob, since the password cannot be
853+ * encrypted and sealed blob is already symmetrically encrypted
854+ * using the a derived key from the seed */
855+ NULL , 0
852856 );
853857 }
854858 if (rc != 0 ) {
@@ -1028,9 +1032,14 @@ int wolfBoot_unseal_auth(const uint8_t* pubkey_hint,
10281032
10291033 memset (& seal_blob , 0 , sizeof (seal_blob ));
10301034
1035+ /* Do not use NV auth, since it cannot be encrypted on transport. The
1036+ * sealed blob is already encrypted and can optionally require a password
1037+ * to unseal */
10311038 rc = wolfBoot_read_blob (WOLFBOOT_TPM_SEAL_NV_BASE + index , & seal_blob ,
1032- auth , authSz );
1039+ NULL , 0 );
10331040 if (rc == 0 ) {
1041+ seal_blob .handle .auth .size = authSz ;
1042+ memcpy (seal_blob .handle .auth .buffer , auth , authSz );
10341043 rc = wolfBoot_unseal_blob (pubkey_hint , policy , policySz , & seal_blob ,
10351044 secret , secret_sz );
10361045 #ifdef WOLFBOOT_DEBUG_TPM
0 commit comments