nokia / AttestationEngine

An experimental (but fully functional) Remote Attestation Engine and Applications for TPM2.0 based systems (cloud, edge, IoT etc)
BSD 3-Clause Clear License
23 stars 17 forks source link

u10 PCR Pretty Print fails if bank is undefined #122

Closed iolivergithub closed 2 years ago

iolivergithub commented 2 years ago

    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2095, in __call__

    return self.wsgi_app(environ, start_response) [Open an interactive python shell in this frame] 

    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2080, in wsgi_app

    response = self.handle_exception(e)

    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2077, in wsgi_app

    response = self.full_dispatch_request()

    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1525, in full_dispatch_request

    rv = self.handle_user_exception(e)

    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1523, in full_dispatch_request

    rv = self.dispatch_request()

    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1509, in dispatch_request

    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)

    File "/home/att/AttestationEngine/u10/blueprints/claims.py", line 83, in claimprettyprintPCRs

    ps = sorted( {int(k) : v for k, v in pcrs.get(p).items()}.items() )

    AttributeError: 'str' object has no attribute 'items'

This happens with the T440's PCR banks which contani sha1 and sha256 keys BUT the sha256 banks are undefined, ie: sha256:{}