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: Write EK certificate files into a directory #466

Merged
merged 4 commits into from
Jul 30, 2021

Conversation

stefanberger
Copy link
Owner

@stefanberger stefanberger commented Jun 17, 2021

This PR implements an option for swptm_setup to write the created EK certificates into a directory. It addresses issue #455.

@coveralls
Copy link

coveralls commented Jun 17, 2021

Pull Request Test Coverage Report for Build 3324

  • 45 of 63 (71.43%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.004%) to 75.38%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/swtpm_utils.c 4 10 40.0%
src/swtpm_setup/swtpm_setup.c 35 47 74.47%
Files with Coverage Reduction New Missed Lines %
src/swtpm_setup/swtpm_setup.c 1 77.7%
Totals Coverage Status
Change from base Build 3317: 0.004%
Covered Lines: 5548
Relevant Lines: 7360

💛 - Coveralls

@stefanberger stefanberger marked this pull request as draft June 18, 2021 20:19
@stefanberger stefanberger marked this pull request as ready for review June 25, 2021 16:13
@stefanberger stefanberger force-pushed the swtpm_setup_write_certfiles branch 2 times, most recently from d566caa to df787ef Compare July 28, 2021 11:45
stefanberger and others added 2 commits July 28, 2021 14:09
Move code from setpm_setup into new function check_directory_access
that checks for existence of directory and access to it.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Pass an optional key_description parameter through the APIs to be able to
get the a human readable key description, such as 'rsa2048' or 'secp384r1'
of the key that was created.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Write the EK certificate files into the directory specified as parameter
to the --write-ek-cert-files option.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Use the --write-ek-cert-files option in existing test cases
and check for written files and correctness of the files.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
@stefanberger stefanberger merged commit a735e4c into master Jul 30, 2021
@stefanberger stefanberger deleted the swtpm_setup_write_certfiles branch July 30, 2021 20:45
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.

None yet

2 participants