Open chrisfenner opened 1 year ago
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) }
Ideally this always gives a canonical code, even if the error is a TPM format-1 error code (bearing handle and other metadata):