-
Notifications
You must be signed in to change notification settings - Fork 143
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: Implement CheckState interface function #556
Conversation
Pull Request Test Coverage Report for Build 3482
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @stefanberger, I put a cleanup comment (nvdata
). Other than that, it looks good to me.
src/swtpm/swtpm_nvstore.c
Outdated
@@ -1324,10 +1324,10 @@ int SWTPM_NVRAM_PrintJson(void) | |||
TPM_RESULT rc = 0; | |||
int ret = 0, n; | |||
unsigned char *nvdata = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvdata
is no longer used. We can remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Hadn't looked. Updated.
f0bf00e
to
c8267b5
Compare
Before it was also only looking for availability of the file, so now we have swtpm pretty much do the same and not try out the file. |
c8267b5
to
cc4a502
Compare
Remove all interface functions from swtpm_nvstore_dir.h and make them static in swtpm_nvstore_dir.c. This way we avoid direct calls to these functions from elsewhere. Move the declaration of the interface structure into swtpm_nvstore.h to get rid of swtpm_nvstore_dir.h entirely. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
…blob Implement a CheckState interface function for checking for the TPM_PERMANENT_ALL_NAME blog. The dirctory backend does a simple stat on the file without actually reading it, which otherwise may require the (correct) key if it was encrypted. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
cc4a502
to
e9c724d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me.
This PR does some cleanup on the directory backend and implements a CheckState interface function for checking for availability of the permanent state blob on the backend.
@Etsukata Please have a look.