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

Upgrade go-tpm and adapt imports to use the legacy version #279

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

hslatman
Copy link
Member

A new version of go-tpm was released that changes the public API of the tpm2 package. The legacy/tpm2 contains the functions we used, so imports were adapted to use that, similar to what's done in other Google repos relying on go-tpm.

The TPMDirect interface that was released with it should provide us a more pleasant and simpler approach for interfacing with the TPM, so I'll look into migrating our usage to that soon.

@hslatman
Copy link
Member Author

hslatman commented Jun 27, 2023

Looks like we'll have to wait till Go 1.21 is released, so that we can drop Go 1.19 support: https://github.com/smallstep/crypto/actions/runs/5388813488/jobs/9781946300. The change was introduced with google/go-tpm@5115077.

Alternatively, since the only code paths that go through credactivation come through go-attestation, we could make that (temporarily) point to an implementation that does not use crypto/ecdh.

@hslatman hslatman requested a review from maraino August 21, 2023 15:09
@hslatman
Copy link
Member Author

After the Go version was upgraded to 1.20, the GH action now completes successfully.

@hslatman hslatman requested a review from a team August 21, 2023 15:11
Copy link
Contributor

@maraino maraino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hslatman hslatman merged commit 7f357a5 into master Aug 21, 2023
12 checks passed
@hslatman hslatman deleted the herman/upgrade-go-tpm branch August 21, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants