Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests with a physical tpm #2871

Merged

Conversation

JuergenReppSIT
Copy link
Member

@JuergenReppSIT JuergenReppSIT commented Jul 21, 2024

  • policy: Add check for sha384 in test policy execute.
  • FAPI: Fix tests with physical TPM using SHA384.
  • tcti mssim: Fix wrong cast on 32 bit systems.

Fixed: #2873

Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
@JuergenReppSIT JuergenReppSIT force-pushed the fix-tests-with-a-physical-tpm branch 2 times, most recently from 47ac4b0 to 24e2f6a Compare July 23, 2024 19:09
@AndreasFuchsTPM AndreasFuchsTPM requested a review from joholl July 24, 2024 14:08
@joholl
Copy link
Collaborator

joholl commented Jul 24, 2024

  • policy/FAPI: LGTM
  • mssim: What about the following two calls? They are even in the same function.

rc = socket_recv_buf (tcti_mssim->tpm_sock, size_buf, sizeof(UINT32));

rc = socket_recv_buf (tcti_mssim->tpm_sock,

Copy link
Collaborator

@joholl joholl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix also the other two calls of socket_recv_buf() in tcti-mssim.

tcti-swtpm is fine.

The cast ssize_t for a variable with type TSS2_RC is removed.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
Several tests failed when sha384 was nor available on
the TPM. SHA384 is removed from tests and profiles which
are executed as default. SHA384 was not removed from
the SHA384 profiles which have to be explicitly configured
if the tests are executed with a physical TPM.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
* The test failed if policy-execute was executed whith a physical
  TPM which did not support sha384
* The test with the policy "pol_authorize_ecc_pem" failed for
  an IFX TPM SLB 9673 and is now skipped.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@JuergenReppSIT JuergenReppSIT force-pushed the fix-tests-with-a-physical-tpm branch from 24e2f6a to 7a37315 Compare July 24, 2024 19:01
@joholl joholl self-requested a review July 25, 2024 10:53
@joholl
Copy link
Collaborator

joholl commented Jul 25, 2024

@JuergenReppSIT Thanks for fixing this (including the things I broke)! Looks good.

@joholl joholl merged commit ac930eb into tpm2-software:master Jul 25, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when compiling and installing the libraries from INSTALL.md
2 participants