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

swtpm_setup: Add support for checking for TPM 1.2 and TPM 2 support #515

Merged
merged 3 commits into from
Aug 10, 2021

Conversation

stefanberger
Copy link
Owner

Implement get_supported_tpm_versions to get swtpm's support for TPM 1.2
and TPM 2 and use it error out in case user choose a TPM version that
is not supported. Also display the supported TPM versions in the
capabilites JSON.

@stefanberger stefanberger marked this pull request as draft August 9, 2021 21:34
@stefanberger
Copy link
Owner Author

This will have to wait until PR #514 has been applied.

@coveralls
Copy link

coveralls commented Aug 9, 2021

Pull Request Test Coverage Report for Build 3352

  • 18 of 25 (72.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.008%) to 75.403%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/swtpm_setup/swtpm_setup.c 18 25 72.0%
Totals Coverage Status
Change from base Build 3348: -0.008%
Covered Lines: 5573
Relevant Lines: 7391

💛 - Coveralls

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
@stefanberger stefanberger force-pushed the master.swtpm_setup_tpm_version_support branch from 08f2944 to 0e8caf0 Compare August 10, 2021 11:41
@stefanberger stefanberger marked this pull request as ready for review August 10, 2021 11:41
Implement get_supported_tpm_versions to get swtpm's support for TPM 1.2
and TPM 2 and use it error out in case user choose a TPM version that
is not supported. Also display the supported TPM versions in the
capabilites JSON.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
@stefanberger stefanberger force-pushed the master.swtpm_setup_tpm_version_support branch from 0e8caf0 to 9500f48 Compare August 10, 2021 11:45
{
gboolean success;
g_autofree gchar *standard_output = NULL;
int exit_status = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

if you don't care about exist_status, you may just pass NULL

@elmarco
Copy link
Contributor

elmarco commented Aug 10, 2021

lgtm

@stefanberger stefanberger merged commit 3eac247 into master Aug 10, 2021
@stefanberger stefanberger deleted the master.swtpm_setup_tpm_version_support branch August 10, 2021 13:38
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.

3 participants