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

Fix "tpm2_ptool verify --sopin" without "--userpin" #635

Merged

Conversation

niooss-ledger
Copy link
Contributor

When using option --sopin in tpm2_ptool verify, usersealauth is not initialized but is being used. In practise, the value in verify_output['wrappingkey']['auth'] is the same as the one in verify_output['pin']['user'], so make sure this is set only when the user PIN is really used.

Fixes: #624

When using option `--sopin` in `tpm2_ptool verify`, `usersealauth` is
not initialized but is being used. In practise, the value in
`verify_output['wrappingkey']['auth']` is the same as the one in
`verify_output['pin']['user']`, so make sure this is set only when the
user PIN is really used.

Fixes: tpm2-software#624
Signed-off-by: Nicolas Iooss <nicolas.iooss@ledger.fr>
@codecov
Copy link

codecov bot commented Dec 28, 2020

Codecov Report

Merging #635 (2a82d32) into master (39f1e0b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #635   +/-   ##
=======================================
  Coverage   74.25%   74.25%           
=======================================
  Files          33       33           
  Lines        8688     8688           
=======================================
  Hits         6451     6451           
  Misses       2237     2237           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39f1e0b...2a82d32. Read the comment docs.

@williamcroberts williamcroberts merged commit fea144f into tpm2-software:master Dec 28, 2020
@niooss-ledger niooss-ledger deleted the fix-tpm2_ptool-verify branch December 28, 2020 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.

Using tpm2_ptool verify --sopin leads to local variable referenced before assignment
2 participants