8000 Add client.ReadAllPCRs and use it in "gotpm read pcr" by josephlr · Pull Request #105 · google/go-tpm-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add client.ReadAllPCRs and use it in "gotpm read pcr" #105

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

Merged
merged 7 commits into from
Jun 18, 2021

Conversation

josephlr
Copy link
Member

This change also includes some other minor cleanups for the command line tool:

  • Formatting of PCRs is improved (to look more like what tpm2-tools does)
  • Now gotpm read pcr and gotpm seal can still both use --hash-algo, but have different default values
  • We now use /dev/tpmrm0 by default.

josephlr added 2 commits June 17, 2021 16:49
This function queries the TPM for it's PCRs and then reads all the PCRs
from all banks.

Signed-off-by: Joe Richey <joerichey@google.com>
Adds in a tpm2_readpcr style formatting for the PCR proto. Having this
be a method on the Pcrs type allows users to use this formatting outside
of the commandline tool.

Signed-off-by: Joe Richey <joerichey@google.com>
josephlr added 4 commits June 17, 2021 17:12
"gotpm read pcr" and "gotpm seal" need different default behavior when a
user doesn't specify a hash algorithm. So we now just have the
subcommand manage the tpm2.Algorithm variable itself, allowing different
subcommands to have different default values.

Also, we now no longer need getSelection(), subcommands can just create
the selection manually.

Signed-off-by: Joe Richey <joerichey@google.com>
This is a *breaking change*, but not a huge one. The format is also now
more consistent with the output of "tpm2 readpcr".

Signed-off-by: Joe Richey <joerichey@google.com>
This makes displaying default values easier.

Signed-off-by: Joe Richey <joerichey@google.com>
This avoids certain "device busy" errors on some Linux distros

Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
@josephlr josephlr requested a review from jkl73 June 18, 2021 01:31
@josephlr josephlr merged commit 91146f4 into google:master Jun 18, 2021
@josephlr josephlr deleted the client branch June 18, 2021 01:40
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.

2 participants
0