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

Support As(TPMRC) for format-1 errors. #340

Open
chrisfenner opened this issue Jul 26, 2023 · 0 comments
Open

Support As(TPMRC) for format-1 errors. #340

chrisfenner opened this issue Jul 26, 2023 · 0 comments

Comments

@chrisfenner
Copy link
Member

Ideally this always gives a canonical code, even if the error is a TPM format-1 error code (bearing handle and other metadata):

_, err := tpm2.SomeCommand{}.Execute(tpm)
var rc tpm2.TPMRC
if errors.As(err, &rc) {
  fmt.Printf("TPM canonical code: %v\n", rc)
}
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

No branches or pull requests

1 participant