Skip to content

tpm2: fix encoding of name returned by Load()#231

Merged
brandonweeks merged 1 commit intogoogle:masterfrom
ericchiang:load
Jan 4, 2021
Merged

tpm2: fix encoding of name returned by Load()#231
brandonweeks merged 1 commit intogoogle:masterfrom
ericchiang:load

Conversation

@ericchiang
Copy link
Copy Markdown
Contributor

TPM2_Load() returns a TPM2B_NAME which includes a size prefix. However,
the currently unpacking removes this. Re-encode the name value so it can
be parsed by DecodeName().

Fixes #230

TPM2_Load() returns a TPM2B_NAME which includes a size prefix. However,
the currently unpacking removes this. Re-encode the name value so it can
be parsed by DecodeName().
@ericchiang ericchiang requested a review from a team as a code owner December 30, 2020 23:48
@ericchiang
Copy link
Copy Markdown
Contributor Author

Searching GitHub, the only users who are using this are just displaying it. They're not actually using the bytes. Most just ignore the return value.

https://github.com/search?l=Go&p=1&q=tpm2.Load%28&type=Code

@brandonweeks brandonweeks merged commit 1dabac4 into google:master Jan 4, 2021
@ericchiang ericchiang deleted the load branch January 5, 2021 16:45
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.

Load should return TPM2B_NAME

2 participants