-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add tpmdata file io functions for keylime to read/write tpm data #16
Conversation
7dcec3d
to
0a79619
Compare
0a79619
to
9de4dc8
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.
Please review and cleanup your diff.
08c42e5
to
1b63af4
Compare
Test passed. Ready for another review. I changed Travis back to what it was, and now all the tests should pass without fail. Thanks. |
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.
By "clean your diff", I intend "remove all changes which do not belong as part of this PR". Changes which are part of this PR should be only the ones required for fulfilling the goals stated in the commit message. (Incidentally, please fix spelling there.)
1b63af4
to
af0b762
Compare
Changed based on review:
Test Passed. Ready for a review. |
af0b762
to
cd06605
Compare
cd06605
to
5dcdae0
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.
Diff still not clean; see previous review.
d4f7c6f
to
de135dd
Compare
Now there are only tpm.rs and tpmdata_test.json files are changed in this PR. Note: Test passed, ready for a review |
6a9a3ba
to
8fe00d7
Compare
Add a output_error_message() function for Err(Box::new(foramt!(...))) that can take a error message and a error and return a error message string. .unwrap()s are removed with error handling Result<>. Rebased onto the new PR. Test passed. Ready for a review. |
3fbde41
to
cf6cfef
Compare
cf6cfef
to
f54d79b
Compare
1. Add an error message intergration helper function 2. All io support function has error handling result that must be handled by caller. 3. For set the tpm data function, it read the file first and write after content is set. Use local variable to store the tpm data content instead of global in python-keylime. [[email protected]: renamed function to emsg, shortened code patterns]
f54d79b
to
72e0a6a
Compare
@leonjia0112 I've made some changes. Please take a look and if you're satisfied they're okay, I'll merge. |
Those changes are decent. I am ok with those changes. Thanks :) |
Added four functions for read/white/get/set tpmdata.json file where tpm data is stored in tpm.rs. Also added a tpmdata_test.json for testing purpose.
Compare to Lincoln lab version:
Original python version used a global variable tpmdata to store tpmdata in global scope. This implementation eliminated global variable is to store tpm data since it is not a frequent access variable.
Test passed. Ready for a review. Thanks.