-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat(pcr0tool): Add verb pcrread
#364
Conversation
What is the status here @rihter007 @trynity @u1f35c ? |
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.
One minor quibble on the panic
and a nit, but approving to unblock.
} | ||
} | ||
if hashAlgo == tpm2.AlgUnknown { | ||
panic(fmt.Errorf("algo '%s' is unknown", *cmd.hashAlgo)) |
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.
Do we really want a panic
here? Seems like we'd want just an error.
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.
If the CLI tool is executed with invalid arguments, then the execution should be interrupted. And this code is responsible for the CLI experience. Replaced with log.Fatal
to be consistent with the rest of the code. Let me know if you'd like another solution.
* List commands alphabetically. * Use log.Fatalf instead of panic
Just a simple tool to read a PCR value from TPM (without using
tpm2-tools
).Feel free to reject this PR. I only added this PR for a single one-time investigation to differentiate if the bug is in tpm2-tools or with TPM module (or its kernel driver) itself.