You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
While testing some arguments of tpm2_ptool, I encountered the following error:
$ ./tpm2_ptool verify --sopin $PIN --label tpm-ssh1Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/user/github/tpm2-pkcs11/tools/tpm2_pkcs11/tpm2_ptool.py", line 30, in <module> main() File "/home/user/github/tpm2-pkcs11/tools/tpm2_pkcs11/tpm2_ptool.py", line 26, in main commandlet.init('A tool for manipulating the tpm2-pkcs11 database') File "/home/user/github/tpm2-pkcs11/tools/tpm2_pkcs11/command.py", line 102, in init commandlet.get()[d['which']](d) File "/home/user/github/tpm2-pkcs11/tools/tpm2_pkcs11/commandlets_token.py", line 181, in __call__ VerifyCommand.verify(db, args) File "/home/user/github/tpm2-pkcs11/tools/tpm2_pkcs11/commandlets_token.py", line 136, in verify 'auth' : usersealauth['hash']UnboundLocalError: local variable 'usersealauth' referenced before assignment
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>
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
Signed-off-by: Nicolas Iooss <nicolas.iooss@ledger.fr>
Hello,
While testing some arguments of
tpm2_ptool
, I encountered the following error:There is a bug in
tpm2-pkcs11/tools/tpm2_pkcs11/commandlets_token.py
Lines 104 to 137 in a9d7b81
When
sopin != None
anduserpin
is None,sosealauth
is set but notusersealauth
and then on line 136,usersealauth
is used while being uninitialized.The text was updated successfully, but these errors were encountered: