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

tpm2: Stop using deprecated go-tpm2 APIs #358

Conversation

chrisccoulson
Copy link
Collaborator

@chrisccoulson chrisccoulson commented Jan 16, 2025

PR #357 migrated the tpm2 code to using the new tpm2.TPMDevice abstraction for opening TPM connections.

The go-tpm2 package contains some other deprecated APIs, and in some cases, entire sub-packages have been deprecated (crypto, templates, util). These have been replaced by alternative APIs, and the util package, which was a bit of a dumping ground for APIs that had nowhere else to go, has been split into more focused packages.

This ports secboot to using updated APIs. It's just a straight port for now - we may want to refactor some code to make better use of these APIs in future PRs - particularly those in the policyutil sub-package, something that will allow us to create keys with arbitrary policies without having to change the key data format for tpm2 keys (see issue #350).

PR canonical#357 migrated the tpm2 code to using the new tpm2.TPMDevice
abstraction for opening TPM connections.

The go-tpm2 package contains some other deprecated APIs, and in some
cases, entire packages have been deprecated (crypto, templates, util).
These have been replaced by alternative APIs, and ithe util package,
which was a bit of a dumping ground for APIs that had nowhere else to
go, has been split into more focused packages.

This ports secboot to using updated APIs. It's just a straight port for
now - we may want to refactor some code to make better use of these APIs
in future PRs.
@chrisccoulson chrisccoulson changed the title tpm2: Stop using deprecated APIs tpm2: Stop using deprecated go-tpm2 APIs Jan 16, 2025
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

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

thank you

@chrisccoulson chrisccoulson merged commit 7e2ebc6 into canonical:master Jan 17, 2025
2 checks passed
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