Skip to content
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

Rewrite to use the new tpmdirect API from go-tpm #9

Merged
merged 18 commits into from
Jul 10, 2023
Merged

Conversation

Foxboron
Copy link
Owner

@Foxboron Foxboron commented Jul 8, 2023

No description provided.

@Foxboron
Copy link
Owner Author

Foxboron commented Jul 8, 2023

@chrisfenner I don't know if you are interested, but here is a rewrite of age-plugin-tpm from the legacy tpm2 API to the new tpmdirect API.

I'm not sure if this works as some form of feedback or if this helps on the API design :)

@Foxboron
Copy link
Owner Author

Foxboron commented Jul 9, 2023

Hrm, actually I tired running this on my actual TPM instead of the swtpm stuff and it fails to do ECDHZGen. Just blocks without any response from the TPM.

Age interrupting the plugin too quickly it seems(?)

Signed-off-by: Morten Linderud <[email protected]>
Signed-off-by: Morten Linderud <[email protected]>
We get a stanza, and we should reply with a stanza. Previously we would
intermingle this which would probably lead to a couple of subtle bugs

This also implements multiple recipients.
Signed-off-by: Morten Linderud <[email protected]>
@Foxboron Foxboron force-pushed the morten/tpmdirect branch 2 times, most recently from db93c1c to d26b975 Compare July 10, 2023 14:10
plugin/key.go Show resolved Hide resolved
plugin/key_test.go Outdated Show resolved Hide resolved
plugin/key_test.go Outdated Show resolved Hide resolved
plugin/plugin.go Outdated Show resolved Hide resolved
plugin/plugin.go Outdated Show resolved Hide resolved
plugin/plugin.go Outdated Show resolved Hide resolved
plugin/plugin.go Outdated Show resolved Hide resolved
plugin/plugin.go Show resolved Hide resolved
plugin/plugin.go Outdated Show resolved Hide resolved
@chrisfenner
Copy link

definitely interested, thanks for tagging me! I have filed a feature request for go-tpm to add a UnmarshalReader/MarshalReader surface, and left a few other comments on the design of your code here. Thanks for using the new go-tpm API!!

@Foxboron
Copy link
Owner Author

definitely interested, thanks for tagging me! I have filed a feature request for go-tpm to add a UnmarshalReader/MarshalReader surface, and left a few other comments on the design of your code here. Thanks for using the new go-tpm API!!

Thank you very much for taking the time to review the code :)

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