Skip to content

v4.0.1

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Jan 19:44
· 1438 commits to master since this release
ima: Return None in case there was no keyring in the DB

This patch fixes the following issue on the verifier side when no
string representation of an IMA keyring is found in the DB.

2021-01-20 15:58:55.083 - keylime.tpm2 - INFO - TPM2-TOOLS Version: 5.0
2021-01-20 15:58:55.084 - keylime.cloudverifier - ERROR - list indices must be integers or slices, not str
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/keylime-0.0.0-py3.8.egg/keylime/cloud_verifier_tornado.py", line 437, in invoke_get_quote
    if cloud_verifier_common.process_quote_response(agent, json_response['results']):
  File "/usr/local/lib/python3.8/site-packages/keylime-0.0.0-py3.8.egg/keylime/cloud_verifier_common.py", line 202, in process_quote_response
    ima_keyring = ima_file_signatures.ImaKeyring.from_string(agent['ima_sign_verification_keys'])
  File "/usr/local/lib/python3.8/site-packages/keylime-0.0.0-py3.8.egg/keylime/ima_file_signatures.py", line 200, in from_string
    for der_key in ImaKeyring._base64_to_der_keylist(obj['pubkeys']):
TypeError: list indices must be integers or slices, not str

Signed-off-by: Stefan Berger <[email protected]>