Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use generics to simplify the TPMDirect interface #310
Use generics to simplify the TPMDirect interface #310
Changes from 30 commits
7455056
80768b1
a588031
19767bc
2a4d4ef
d6e0322
f56968e
c5f9000
c194a85
e24118f
885e02f
f5ae2a0
8745d7c
4664afb
6c5e9af
59fca5b
62153a3
e99d3da
efce1b6
9a427ad
bb631ab
bc7a3e8
cc3e50d
15e029b
20d185c
27eb18c
892576d
cb5551d
6e752c1
37ece20
b47f2a0
4ada408
f614469
1317f8a
2c4ed7d
2a3dd05
eecf011
ed1c3ed
9003b1a
89afd86
b90e66f
4567fe4
889e9f5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This doesn't seem to return 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.
Good catch. I'll fix this.
To your other questions:
As an adapter so that we can use https://github.com/google/go-tpm-tools/tree/master/simulator (which will call back to Startup and Shutdown as free functions in go-tpm) until there's a version of go-tpm-tools that calls TPMDirect startup and shutdown. I'll add a comment and TODO about this.
This allows the internal consistency check in the
execute
function to match the correct command and response together. I guess this could be done with generics instead now, WDYT?Yeah, this is a great point. I'll make e.g., the
TPM2B
types themselves public and provide public constructors.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.
I was playing around a little and I think the following would work well:
Have a
tpm2b
submodule:Then in the main
tpm2
module will have just the typedefs:I think not having
Marshall
/marshal
return an error makes the library easier to use.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.
Might be good to make it more clear the relationship between Marshallable and Unmarshallable