Skip to content

Commit

Permalink
MU: Display error message for errors with wrong selectors.
Browse files Browse the repository at this point in the history
If a wrong selector was used for a TPMU objects to be marshalled
only the error bad value was returned.
Now an error log message is displayed.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
  • Loading branch information
JuergenReppSIT authored and AndreasFuchsTPM committed Apr 17, 2024
1 parent 0ef6b1b commit 646bf8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tss2-mu/tpmu-types.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ TSS2_RC Tss2_MU_##type##_Marshal(type const *src, uint32_t selector, uint8_t buf
ret = TSS2_RC_SUCCESS; \
break; \
default: \
LOG_DEBUG("wrong selector 0x%"PRIx32" return error", selector); \
LOG_ERROR("wrong selector 0x%"PRIx32" return error", selector); \
break; \
} \
return ret; \
Expand Down Expand Up @@ -425,7 +425,7 @@ TSS2_RC Tss2_MU_##type##_Unmarshal(uint8_t const buffer[], size_t buffer_size, \
ret = TSS2_RC_SUCCESS; \
break; \
default: \
LOG_DEBUG("wrong selector 0x%"PRIx32" return error", selector); \
LOG_ERROR("wrong selector 0x%"PRIx32" return error", selector); \
break; \
} \
return ret; \
Expand Down

0 comments on commit 646bf8e

Please sign in to comment.