Skip to content
Snippets Groups Projects

Draft: Compare changes for Humble integration

Open Felix Pfeiffer requested to merge jazzy-tpm into jazzy
Files
4
@@ -50,6 +50,7 @@ def extend_permission_with_pcr(
keystore_path: pathlib.Path,
identity: str,
system_identifier: str,
config_identifier: str,
subject: str
):
relative_path = os.path.normpath(identity.lstrip('/'))
@@ -62,6 +63,7 @@ def extend_permission_with_pcr(
# Create XML elements to add to the permission.xml
pcr_selection_children = []
config_found = False
for _, dirs, _ in os.walk(tpm_system_dir):
for config_dir in dirs:
@@ -77,12 +79,14 @@ def extend_permission_with_pcr(
pcr_selection_children.append(*_create_permission_xml_for_value(pcr_values_data))
# Copy pcr_selection.txt into the enclave
# TODO: do this only once
shutil.copy(tpm_pcr_selection_path, key_tpm_dir)
if config_dir == config_identifier:
shutil.copy(tpm_pcr_selection_path, key_tpm_dir)
config_found = True
break
if not config_found:
raise sros2.errors.SystemConfigNotFound(config_identifier, system_identifier)
Loading