From 7117323acc739eeffe6693f7ad5182c1a741f1da Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Fri, 15 Mar 2024 15:03:15 +0100 Subject: [PATCH] suit: Migrate suit-text encoding With the manifest specification version 24 the suit-text field has a language tag, so descriptions in multiple languages can be added. Signed-off-by: Tomasz Chyrowicz --- examples/input_files/envelope_1.json | 17 +- examples/input_files/envelope_1.yaml | 15 +- .../input_files/envelope_2_hierarchical.yaml | 45 ++-- ncs/802154_rad_envelope.yaml.jinja2 | 15 +- ncs/app_envelope.yaml.jinja2 | 15 +- ncs/multiprotocol_rad_envelope.yaml.jinja2 | 15 +- ncs/rad_envelope.yaml.jinja2 | 15 +- suit_generator/suit/manifest.py | 8 +- tests/fuzz/fuzz_suit_obj.py | 16 +- tests/fuzz/fuzz_suit_yaml.py | 15 +- tests/test_cbor_out_of_spec.py | 15 +- tests/test_cmd_image.py | 193 ++++++++------- tests/test_envelope.py | 7 +- tests/test_envelope_api.py | 14 +- tests/test_hierarchical_manifest.py | 228 +++++++++--------- tests/test_ncs_sign_script.py | 7 +- tests/test_suit_envelope.py | 150 ++++++------ tests/test_suit_envelope_severable.py | 90 +++---- 18 files changed, 467 insertions(+), 413 deletions(-) diff --git a/examples/input_files/envelope_1.json b/examples/input_files/envelope_1.json index 06642012..eeb98e05 100644 --- a/examples/input_files/envelope_1.json +++ b/examples/input_files/envelope_1.json @@ -124,13 +124,16 @@ } }, "suit-text": { - "[\"M\", 2, 235577344, 352256]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "The nRF5420 application core", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0"} + "en": { + "[\"M\", 2, 235577344, 352256]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "The nRF5420 application core", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0" + } + } }, "suit-integrated-payloads": { diff --git a/examples/input_files/envelope_1.yaml b/examples/input_files/envelope_1.yaml index 0632936a..a354599d 100644 --- a/examples/input_files/envelope_1.yaml +++ b/examples/input_files/envelope_1.yaml @@ -59,12 +59,13 @@ SUIT_Envelope_Tagged: suit-digest-algorithm-id: cose-alg-sha-256 suit-digest-bytes: '' suit-text: - '["M", 2, 235577344, 352256]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF5420_cpuapp - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF5420 application core - suit-text-component-description: Sample application core FW - suit-text-component-version: v1.0.0 + en: + '["M", 2, 235577344, 352256]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF5420_cpuapp + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF5420 application core + suit-text-component-description: Sample application core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#file.bin': file.bin diff --git a/examples/input_files/envelope_2_hierarchical.yaml b/examples/input_files/envelope_2_hierarchical.yaml index 27050460..ad6aa1fe 100644 --- a/examples/input_files/envelope_2_hierarchical.yaml +++ b/examples/input_files/envelope_2_hierarchical.yaml @@ -64,13 +64,14 @@ SUIT_Dependent_Manifests: namespace: nordicsemi.com name: nRF54H20_sample_app suit-text: - '["M", 2, 235577344, 522240]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpuapp - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 application core - suit-text-component-description: Sample application core FW - suit-text-component-version: v1.0.0 + en: + '["M", 2, 235577344, 522240]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpuapp + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 application core + suit-text-component-description: Sample application core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#app.bin': app.bin radio_envelope: &rad @@ -138,13 +139,14 @@ SUIT_Dependent_Manifests: namespace: nordicsemi.com name: nRF54H20_sample_rad suit-text: - '["M", 3, 235225088, 350208]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpurad - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 radio core - suit-text-component-description: Sample radio core FW - suit-text-component-version: v1.0.0 + en: + '["M", 3, 235225088, 350208]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpurad + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 radio core + suit-text-component-description: Sample radio core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#rad.bin': rad.bin SUIT_Envelope_Tagged: @@ -282,13 +284,14 @@ SUIT_Envelope_Tagged: namespace: nordicsemi.com name: nRF54H20_sample_root suit-text: - '["C", 0]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20 - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 root manifest - suit-text-component-description: Sample root manifest - suit-text-component-version: v1.0.0 + en: + '["C", 0]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20 + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 root manifest + suit-text-component-description: Sample root manifest + suit-text-component-version: v1.0.0 suit-integrated-dependencies: '#rad.suit': *rad '#app.suit': *app diff --git a/ncs/802154_rad_envelope.yaml.jinja2 b/ncs/802154_rad_envelope.yaml.jinja2 index 0d806d25..b49d9745 100644 --- a/ncs/802154_rad_envelope.yaml.jinja2 +++ b/ncs/802154_rad_envelope.yaml.jinja2 @@ -87,12 +87,13 @@ SUIT_Envelope_Tagged: namespace: {{ mpi_rad_vendor_name }} name: {{ mpi_rad_class_name }} suit-text: - '["MEM", {{ _802154_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(_802154_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ _802154_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpurad - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 radio core - suit-text-component-description: Sample radio core FW - suit-text-component-version: v1.0.0 + en: + '["MEM", {{ _802154_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(_802154_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ _802154_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpurad + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 radio core + suit-text-component-description: Sample radio core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#{{ _802154_rpmsg_subimage['name'] }}': {{ _802154_rpmsg_subimage['binary'] }} \ No newline at end of file diff --git a/ncs/app_envelope.yaml.jinja2 b/ncs/app_envelope.yaml.jinja2 index 7e32c17b..46c1ef65 100644 --- a/ncs/app_envelope.yaml.jinja2 +++ b/ncs/app_envelope.yaml.jinja2 @@ -133,13 +133,14 @@ SUIT_Envelope_Tagged: namespace: {{ mpi_app_vendor_name }} name: {{ mpi_app_class_name }} suit-text: - '["MEM", {{ app['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(app['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ app['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpuapp - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 application core - suit-text-component-description: Sample application core FW - suit-text-component-version: v1.0.0 + en: + '["MEM", {{ app['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(app['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ app['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpuapp + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 application core + suit-text-component-description: Sample application core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#{{ app['name'] }}': {{ app['binary'] }} {%- if flash_companion_subimage is defined %} diff --git a/ncs/multiprotocol_rad_envelope.yaml.jinja2 b/ncs/multiprotocol_rad_envelope.yaml.jinja2 index fd73e945..7fd756fa 100644 --- a/ncs/multiprotocol_rad_envelope.yaml.jinja2 +++ b/ncs/multiprotocol_rad_envelope.yaml.jinja2 @@ -87,12 +87,13 @@ SUIT_Envelope_Tagged: namespace: {{ mpi_rad_vendor_name }} name: {{ mpi_rad_class_name }} suit-text: - '["MEM", {{ multiprotocol_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(multiprotocol_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ multiprotocol_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpurad - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 radio core - suit-text-component-description: Sample radio core FW - suit-text-component-version: v1.0.0 + en: + '["MEM", {{ multiprotocol_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(multiprotocol_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ multiprotocol_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpurad + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 radio core + suit-text-component-description: Sample radio core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#{{ multiprotocol_rpmsg_subimage['name'] }}': {{ multiprotocol_rpmsg_subimage['binary'] }} \ No newline at end of file diff --git a/ncs/rad_envelope.yaml.jinja2 b/ncs/rad_envelope.yaml.jinja2 index 2ff6bb5b..800d8fbc 100644 --- a/ncs/rad_envelope.yaml.jinja2 +++ b/ncs/rad_envelope.yaml.jinja2 @@ -87,12 +87,13 @@ SUIT_Envelope_Tagged: namespace: {{ mpi_rad_vendor_name }} name: {{ mpi_rad_class_name }} suit-text: - '["MEM", {{ hci_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(hci_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ hci_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpurad - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 radio core - suit-text-component-description: Sample radio core FW - suit-text-component-version: v1.0.0 + en: + '["MEM", {{ hci_rpmsg_subimage['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(hci_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ hci_rpmsg_subimage['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpurad + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 radio core + suit-text-component-description: Sample radio core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#{{ hci_rpmsg_subimage['name'] }}': {{ hci_rpmsg_subimage['binary'] }} \ No newline at end of file diff --git a/suit_generator/suit/manifest.py b/suit_generator/suit/manifest.py index 63fa5696..38f3dcf0 100644 --- a/suit_generator/suit/manifest.py +++ b/suit_generator/suit/manifest.py @@ -354,10 +354,16 @@ class SuitTextKeys(SuitEnum): ) +class SuitTextLMap(SuitKeyValueUnnamed): + """Representation of language-specific SUIT text map.""" + + _metadata = Metadata(map={SuitComponentIdentifier: SuitTextComponentKeys, SuitTextKeys: SuitTstr}) + + class SuitTextMap(SuitKeyValueUnnamed): """Representation of SUIT text map.""" - _metadata = Metadata(map={SuitComponentIdentifier: SuitTextComponentKeys, SuitTextKeys: SuitTstr}) + _metadata = Metadata(map={SuitTstr: SuitTextLMap}) class SuitSeverableText(SuitUnion): diff --git a/tests/fuzz/fuzz_suit_obj.py b/tests/fuzz/fuzz_suit_obj.py index 67e9f591..9b884922 100644 --- a/tests/fuzz/fuzz_suit_obj.py +++ b/tests/fuzz/fuzz_suit_obj.py @@ -246,13 +246,15 @@ }}, "suit-text": {{ - "[\\"M\\", 2, 235577344, 352256]": {{ - "suit-text-vendor-name": "{suit_text_vendor_name}", - "suit-text-model-name": "{suit_text_model_name}", - "suit-text-vendor-domain": "{suit_text_vendor_domain}", - "suit-text-model-info": "{suit_text_model_info}", - "suit-text-component-description": "{suit_text_component_description}", - "suit-text-component-version": "{suit_text_component_version}" + "en": {{ + "[\\"M\\", 2, 235577344, 352256]": {{ + "suit-text-vendor-name": "{suit_text_vendor_name}", + "suit-text-model-name": "{suit_text_model_name}", + "suit-text-vendor-domain": "{suit_text_vendor_domain}", + "suit-text-model-info": "{suit_text_model_info}", + "suit-text-component-description": "{suit_text_component_description}", + "suit-text-component-version": "{suit_text_component_version}" + }} }} }}, "suit-integrated-payloads": diff --git a/tests/fuzz/fuzz_suit_yaml.py b/tests/fuzz/fuzz_suit_yaml.py index ad50f0e1..5257d3cf 100644 --- a/tests/fuzz/fuzz_suit_yaml.py +++ b/tests/fuzz/fuzz_suit_yaml.py @@ -73,13 +73,14 @@ - INSTLD_MFST - raw: {suit_manifest_component_id} suit-text: - '["MEM", 0, 524288, 0]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: test - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The test application - suit-text-component-description: Sample application for test - suit-text-component-version: v1.0.0 + en: + '["MEM", 0, 524288, 0]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: test + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The test application + suit-text-component-description: Sample application for test + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#file.bin': file.bin """ diff --git a/tests/test_cbor_out_of_spec.py b/tests/test_cbor_out_of_spec.py index 4c6f5e77..6cb82598 100644 --- a/tests/test_cbor_out_of_spec.py +++ b/tests/test_cbor_out_of_spec.py @@ -51,13 +51,14 @@ - INSTLD_MFST - raw: {{suit_manifest_component_id}} suit-text: - '["MEM", 0, 524288, 0]': - suit-text-vendor-name: test vendor - suit-text-model-name: test model name - suit-text-vendor-domain: vendor.domain.example - suit-text-model-info: test model - suit-text-component-description: test component description - suit-text-component-version: test component version + en: + '["MEM", 0, 524288, 0]': + suit-text-vendor-name: test vendor + suit-text-model-name: test model name + suit-text-vendor-domain: vendor.domain.example + suit-text-model-info: test model + suit-text-component-description: test component description + suit-text-component-version: test component version """ CBOR_TEST_DATA = { diff --git a/tests/test_cmd_image.py b/tests/test_cmd_image.py index abc3f182..45664f94 100644 --- a/tests/test_cmd_image.py +++ b/tests/test_cmd_image.py @@ -18,36 +18,45 @@ sizes = {0x00000000: b"\x00\x00\x00\x00", 0x01020304: b"\x04\x03\x02\x01", 0xFFFFFFFF: b"\xFF\xFF\xFF\xFF"} signed_envelope_without_class_id_input = ( - b"\xd8k\xa4\x02Xs\x82X$\x82/X \xf1:\x80\x8f\xa3\x16)\x95\xd4G\xd3\xde\xe8\r\xa6\xb6\n\xcc\x03" - b"\xb8m\xdc{\x12Z\x9b\xe5\x9e\xa0\xddL]XJ\xd2\x84C\xa1\x01&\xa0\xf6X@0!\n\xd4\xb7=\x13\xfc\xbaF" - b"*\xb02\xa7p\xb5s\x83@6}\x96Q\x1d\xdc\xb3)\x07@<0\x99\xd7J\x1c\xaa\x8f_6\xf3\x08\xaa\xa7\xde" - b"\x8fG\xedJ\xdd\xcdO^!$\x94\xa2U\xad\xb4\xb6\x8bC\xa8S\x03X\xba\xa7\x01\x01\x02\x01\x03Xo\xa2" - b"\x02\x81\x84DcMEMA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00\x04XU\x86\x14\xa4\x01Pv\x17\xda" - b"\xa5q\xfdZ\x85\x8f\x94\xe2\x8ds\\\xe9\xf4\x02P\x08\xc1\xb5\x99U\xe8_\xbc\x9ev{\xc2\x9c\xe1\xb0" - b"M\x03X$\x82/X fhz\xad\xf8b\xbdwl\x8f\xc1\x8b\x8e\x9f\x8e \x08\x97\x14\x85n\xe23\xb3\x90*Y\x1d" - b"\r_)%\x0e\x18 \x01\x0f\x02\x0f\x07C\x82\x03\x0f\tC\x82\x17\x02\x11R\x86\x14\xa1\x15i#file.bin" - b"\x15\x02\x03\x0f\x17\x82/X \xd6%\x82'\x08\xfb\x1b\x18x\x8c\x98waBt\xf0\x966\xa7\xe0yN\xbd\x87" - b"\x9b\xa1\x90*\xf1K8\x05\x17X\x97\xa1\x84DcMEMA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00\xa6" - b"\x01x\x18Nordic Semiconductor ASA\x02onRF54H20_cpuapp\x03nnordicsemi.com\x04x\x1dThe nRF54H20" - b" application core\x05x\x1aSample application core FW\x06fv1.0.0i#file.binX \x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00" + b"\xd8k\xa4\x02X'\x81X$\x82/X 7d\x90\xc1\xa5\x84\xc1\xed\xeeO\x0f\xd6\xad\xc5t\xb0\x1dr\xb5r" + b"\xa8\x8a\xdaA\x95\xff\xa9\x88O\xb2w\x1e\x03X\xbb\xa7\x01\x01\x02\x01\x03Xp\xa2\x02\x81\x84DcM" + b"EMA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00\x04XV\x86\x14\xa4\x01Pv\x17\xda\xa5q\xfdZ\x85" + b"\x8f\x94\xe2\x8ds\\\xe9\xf4\x02P\x08\xc1\xb5\x99U\xe8_\xbc\x9ev{\xc2\x9c\xe1\xb0M\x03X$\x82" + b"/X _\xc3T\xbf\x8e\x8cP\xfbO\xbc,\xfa\xeb\x04SA\xc9\x80m\xea\xbd\xcbAT\xfby\xcc\xa4\xf0\xc9" + b"\x8c\x12\x0e\x19\x01\x00\x01\x0f\x02\x0f\x07C\x82\x03\x0f\tC\x82\x17\x02\x11R\x86\x14\xa1\x15" + b"i#file.bin\x15\x02\x03\x0f\x17\x82/X Y-\x8d\r\xf0\x93\xd7\x1d6\x82\x85rUd^\x1bV@8&HDF\x04\xff" + b"\xd5j \xd8O\xe6\xdb\x17X\x9b\xa1ben\xa1\x84DcMEMA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00" + b"\xa6\x01x\x18Nordic Semiconductor ASA\x02onRF54H20_cpuapp\x03nnordicsemi.com\x04x\x1dThe nRF5" + b"4H20 application core\x05x\x1aSample application core FW\x06fv1.0.0i#file.binY\x01\x00\xc7" + b"\x9c\xab\x9d\xe83\x7f0\x14\xeb\xac\x02\xaf&\x01^\x80m\x88\xa1\xdb\x11\xa71\xdf\xa6\xec\xcb" + b"\x9bH\r\xc84@m0\x86}\xe8\x1b\xec<\xf5@\xd0H\x18\x82\x11\x9d|?l\xe5\x8f\xf1\xd3]\xe1Q\xf7j\x0f" + b'\xaf\x0b\xbdL_\xa54\x1af\xdb"\xecc\xedK\xab\xc7\xc8\xf7Y\xd8\xd6\x9e\xecq\x1b$ \xb9\xae\xe1;' + b'\xfc\xae\xb8w\xac\xa4W4\x97\x84OX\xd5h\x08o\xe3\x9c~\x1b\xd78"\x98H\xf8zg\xb2\xd9\xac\xc54' + b"\xc1'\x82\x8eBy\x84!7LAJ\x0f\xe2\x7f\xa0j\x19\x13=R\"\x7f\xd6/q\x12v\xab%\x9c\xfcg\x08\x03|" + b"\xdb\x18\xe6E\xf8\x99\xc2\x9e,\xe3\x9b%\xa9{\t\xff\x00W&\x08\n\x11B\xcf\x82\xa2k*\x99\xf9q" + b"\x9d\x14\x19\\\\x1`BJ\x18\x1f\xecxj\x9a|O\xcf\xe8Z)e\xcd\x01;mS\xbb\xc6\xdb\xda\xd5\x8f\xf7" + b"\xf4\xd9\xb9\n\x03K\xff3\xab;\xc5\xaf\xd0\xb8,\x0fj\xa9\x11\xb0\xe8W\x8c\x92S\x81" ) signed_envelope_input = ( - b"\xd8k\xa4\x02Xs\x82X$\x82/X ,\xb17i\xebj\xb3f \x95'\x0e\\\xa6\x8f\xc0\xb5\x9fnd\xf32\xa1)k<" - b"\xe0\x8e\x9a\xcaO\x7fXJ\xd2\x84C\xa1\x01&\xa0\xf6X@\x1d\x8e\xc1h\xbd\x91\xa5\xb3C5\xb6V=xI\x80" - b"#\xd9\xd6\xbdh~\xd2\x8a\xa8:\xd7zg\xbf#\x87\x00k\x7f\"\x88V'\x99\xb3\x08ITi\x04\x0e0\xe9A@:" - b"\xafB\xfd\x16\xd1\xe3\x1cS\x17$\x97\xab\x03X\xda\xa8\x01\x01\x02\x01\x03Xo\xa2\x02\x81\x84DcME" - b"MA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00\x04XU\x86\x14\xa4\x01Pv\x17\xda\xa5q\xfdZ\x85\x8f" - b"\x94\xe2\x8ds\\\xe9\xf4\x02P\x08\xc1\xb5\x99U\xe8_\xbc\x9ev{\xc2\x9c\xe1\xb0M\x03X$\x82/X fhz" - b"\xad\xf8b\xbdwl\x8f\xc1\x8b\x8e\x9f\x8e \x08\x97\x14\x85n\xe23\xb3\x90*Y\x1d\r_)%\x0e\x18 \x01" - b"\x0f\x02\x0f\x07C\x82\x03\x0f\tC\x82\x17\x02\x11R\x86\x14\xa1\x15i#file.bin\x15\x02\x03\x0f" - b"\x17\x82/X \xd6%\x82'\x08\xfb\x1b\x18x\x8c\x98waBt\xf0\x966\xa7\xe0yN\xbd\x87\x9b\xa1\x90*\xf1" - b"K8\x05\x05\x82LkINSTLD_MFSTP\x08\xc1\xb5\x99U\xe8_\xbc\x9ev{\xc2\x9c\xe1\xb0M\x17X\x97\xa1\x84" - b"DcMEMA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00\xa6\x01x\x18Nordic Semiconductor ASA\x02onRF54" - b"H20_cpuapp\x03nnordicsemi.com\x04x\x1dThe nRF54H20 application core\x05x\x1aSample application" - b" core FW\x06fv1.0.0i#file.binX \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + b"\xd8k\xa4\x02X'\x81X$\x82/X 0EH{\xd1\xb4Q\xab\xf56\x01\x06\x8e#\x81\xafn\xe3g)xn.\x12\x89" + b"\xb2\x15x\xb5\xcf\xef\xfe\x03X\xdb\xa8\x01\x01\x02\x01\x03Xp\xa2\x02\x81\x84DcMEMA\x02E\x1a" + b"\x0e\n\xa0\x00E\x1a\x00\x05`\x00\x04XV\x86\x14\xa4\x01Pv\x17\xda\xa5q\xfdZ\x85\x8f\x94\xe2" + b"\x8ds\\\xe9\xf4\x02P\x08\xc1\xb5\x99U\xe8_\xbc\x9ev{\xc2\x9c\xe1\xb0M\x03X$\x82/X _\xc3T\xbf" + b"\x8e\x8cP\xfbO\xbc,\xfa\xeb\x04SA\xc9\x80m\xea\xbd\xcbAT\xfby\xcc\xa4\xf0\xc9\x8c\x12\x0e\x19" + b"\x01\x00\x01\x0f\x02\x0f\x07C\x82\x03\x0f\tC\x82\x17\x02\x11R\x86\x14\xa1\x15i#file.bin\x15" + b"\x02\x03\x0f\x17\x82/X Y-\x8d\r\xf0\x93\xd7\x1d6\x82\x85rUd^\x1bV@8&HDF\x04\xff\xd5j \xd8O" + b"\xe6\xdb\x05\x82LkINSTLD_MFSTP\x08\xc1\xb5\x99U\xe8_\xbc\x9ev{\xc2\x9c\xe1\xb0M\x17X\x9b\xa1b" + b"en\xa1\x84DcMEMA\x02E\x1a\x0e\n\xa0\x00E\x1a\x00\x05`\x00\xa6\x01x\x18Nordic Semiconductor AS" + b"A\x02onRF54H20_cpuapp\x03nnordicsemi.com\x04x\x1dThe nRF54H20 application core\x05x\x1aSample" + b" application core FW\x06fv1.0.0i#file.binY\x01\x00\xc7\x9c\xab\x9d\xe83\x7f0\x14\xeb\xac\x02" + b"\xaf&\x01^\x80m\x88\xa1\xdb\x11\xa71\xdf\xa6\xec\xcb\x9bH\r\xc84@m0\x86}\xe8\x1b\xec<\xf5@" + b'\xd0H\x18\x82\x11\x9d|?l\xe5\x8f\xf1\xd3]\xe1Q\xf7j\x0f\xaf\x0b\xbdL_\xa54\x1af\xdb"\xecc\xed' + b"K\xab\xc7\xc8\xf7Y\xd8\xd6\x9e\xecq\x1b$ \xb9\xae\xe1;\xfc\xae\xb8w\xac\xa4W4\x97\x84OX\xd5h" + b"\x08o\xe3\x9c~\x1b\xd78\"\x98H\xf8zg\xb2\xd9\xac\xc54\xc1'\x82\x8eBy\x84!7LAJ\x0f\xe2\x7f\xa0" + b'j\x19\x13=R"\x7f\xd6/q\x12v\xab%\x9c\xfcg\x08\x03|\xdb\x18\xe6E\xf8\x99\xc2\x9e,\xe3\x9b%\xa9' + b"{\t\xff\x00W&\x08\n\x11B\xcf\x82\xa2k*\x99\xf9q\x9d\x14\x19\\\\x1`BJ\x18\x1f\xecxj\x9a|O\xcf" + b"\xe8Z)e\xcd\x01;mS\xbb\xc6\xdb\xda\xd5\x8f\xf7\xf4\xd9\xb9\n\x03K\xff3\xab;\xc5\xaf\xd0\xb8," + b"\x0fj\xa9\x11\xb0\xe8W\x8c\x92S\x81" ) malformed_envelope_input = b"\x00" @@ -318,29 +327,29 @@ ":10A3E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7D\n" ":10A3F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6D\n" # Application local 1 manifest slot (0x0E1EA400) - ":10A40000A300010119014602590156D86BA2025856\n" - ":10A4100073825824822F58202CB13769EB6AB366B7\n" - ":10A420002095270E5CA68FC0B59F6E64F332A129DC\n" - ":10A430006B3CE08E9ACA4F7F584AD28443A10126D2\n" - ":10A44000A0F658401D8EC168BD91A5B34335B656E0\n" - ":10A450003D78498023D9D6BD687ED28AA83AD77A7A\n" - ":10A4600067BF2387006B7F2288562799B30849541A\n" - ":10A4700069040E30E941403AAF42FD16D1E31C5366\n" - ":10A48000172497AB0358DAA80101020103586FA201\n" - ":10A4900002818444634D454D4102451A0E0AA000D5\n" - ":10A4A000451A000560000458558614A4015076171B\n" - ":10A4B000DAA571FD5A858F94E28D735CE9F4025040\n" - ":10A4C00008C1B59955E85FBC9E767BC29CE1B04D52\n" - ":10A4D000035824822F582066687AADF862BD776CE5\n" - ":10A4E0008FC18B8E9F8E20089714856EE233B390B8\n" - ":10A4F0002A591D0D5F29250E1820010F020F074351\n" - ":10A5000082030F094382170211528614A115692391\n" - ":10A5100066696C652E62696E1502030F17822F58EB\n" - ":10A5200020D625822708FB1B18788C987761427407\n" - ":10A53000F09636A7E0794EBD879BA1902AF14B3863\n" - ":10A540000505824C6B494E53544C445F4D46535461\n" - ":10A550005008C1B59955E85FBC9E767BC29CE1B0BE\n" - ":10A560004DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD\n" + ":10A40000A300010118FB0259010BD86BA2025827C7\n" + ":10A41000815824822F58203045487BD1B451ABF568\n" + ":10A420003601068E2381AF6EE36729786E2E12897E\n" + ":10A43000B21578B5CFEFFE0358DBA8010102010386\n" + ":10A440005870A202818444634D454D4102451A0E65\n" + ":10A450000AA000451A000560000458568614A4019D\n" + ":10A46000507617DAA571FD5A858F94E28D735CE9F9\n" + ":10A47000F4025008C1B59955E85FBC9E767BC29C3A\n" + ":10A48000E1B04D035824822F58205FC354BF8E8CF7\n" + ":10A4900050FB4FBC2CFAEB045341C9806DEABDCB95\n" + ":10A4A0004154FB79CCA4F0C98C120E190100010FA4\n" + ":10A4B000020F074382030F094382170211528614C9\n" + ":10A4C000A115692366696C652E62696E1502030F1A\n" + ":10A4D00017822F5820592D8D0DF093D71D36828568\n" + ":10A4E0007255645E1B5640382648444604FFD56AC0\n" + ":10A4F00020D84FE6DB05824C6B494E53544C445FE9\n" + ":10A500004D4653545008C1B59955E85FBC9E767BC3\n" + ":10A51000C29CE1B04DFFFFFFFFFFFFFFFFFFFFFF0A\n" + ":10A52000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3B\n" + ":10A53000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2B\n" + ":10A54000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1B\n" + ":10A55000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0B\n" + ":10A56000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB\n" ":10A57000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB\n" ":10A58000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDB\n" ":10A59000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCB\n" @@ -518,47 +527,59 @@ expected_update_storage = ( ":020000040E1ECE\n" - ":10EC0000AA55AA55010000000000100E1C020000C9\n" + ":10EC0000AA55AA55010000000000100EB60200002F\n" ":10EC100000000000000000000000000000000000F4\n" ":10EC200000000000000000000000000000000000E4\n" ":00000001FF\n" ) + + expected_update_dfu_partition = ( ":020000040E10DC\n" - ":10000000D86BA4025873825824822F58202CB13701\n" - ":1000100069EB6AB3662095270E5CA68FC0B59F6E0C\n" - ":1000200064F332A1296B3CE08E9ACA4F7F584AD2C2\n" - ":100030008443A10126A0F658401D8EC168BD91A53C\n" - ":10004000B34335B6563D78498023D9D6BD687ED2B4\n" - ":100050008AA83AD77A67BF2387006B7F2288562702\n" - ":1000600099B308495469040E30E941403AAF42FD62\n" - ":1000700016D1E31C53172497AB0358DAA8010102E9\n" - ":100080000103586FA202818444634D454D410245EE\n" - ":100090001A0E0AA000451A0005600004585586147F\n" - ":1000A000A401507617DAA571FD5A858F94E28D73FD\n" - ":1000B0005CE9F4025008C1B59955E85FBC9E767BB7\n" - ":1000C000C29CE1B04D035824822F582066687AAD57\n" - ":1000D000F862BD776C8FC18B8E9F8E200897148538\n" - ":1000E0006EE233B3902A591D0D5F29250E182001A9\n" - ":1000F0000F020F074382030F094382170211528632\n" - ":1001000014A115692366696C652E62696E15020378\n" - ":100110000F17822F5820D625822708FB1B18788CB2\n" - ":100120009877614274F09636A7E0794EBD879BA11F\n" - ":10013000902AF14B380505824C6B494E53544C4480\n" - ":100140005F4D4653545008C1B59955E85FBC9E7643\n" - ":100150007BC29CE1B04D175897A18444634D454D37\n" - ":100160004102451A0E0AA000451A00056000A601CA\n" - ":1001700078184E6F726469632053656D69636F6EA2\n" - ":10018000647563746F7220415341026F6E5246353D\n" - ":10019000344832305F637075617070036E6E6F72D9\n" - ":1001A00064696373656D692E636F6D04781D5468AF\n" - ":1001B00065206E52463534483230206170706C696B\n" - ":1001C000636174696F6E20636F726505781A53619D\n" - ":1001D0006D706C65206170706C69636174696F6EBD\n" - ":1001E00020636F7265204657066676312E302E30BA\n" - ":1001F000692366696C652E62696E582000000000F4\n" - ":1002000000000000000000000000000000000000EE\n" - ":0C021000000000000000000000000000E2\n" + ":10000000D86BA4025827815824822F5820304548A5\n" + ":100010007BD1B451ABF53601068E2381AF6EE36719\n" + ":1000200029786E2E1289B21578B5CFEFFE0358DB12\n" + ":10003000A801010201035870A202818444634D4566\n" + ":100040004D4102451A0E0AA000451A000560000441\n" + ":1000500058568614A401507617DAA571FD5A858F7B\n" + ":1000600094E28D735CE9F4025008C1B59955E85FDC\n" + ":10007000BC9E767BC29CE1B04D035824822F582051\n" + ":100080005FC354BF8E8C50FB4FBC2CFAEB04534122\n" + ":10009000C9806DEABDCB4154FB79CCA4F0C98C1268\n" + ":1000A0000E190100010F020F074382030F0943825B\n" + ":1000B000170211528614A115692366696C652E62B8\n" + ":1000C000696E1502030F17822F5820592D8D0DF0E0\n" + ":1000D00093D71D3682857255645E1B56403826487C\n" + ":1000E000444604FFD56A20D84FE6DB05824C6B49B5\n" + ":1000F0004E53544C445F4D4653545008C1B5995526\n" + ":10010000E85FBC9E767BC29CE1B04D17589BA16214\n" + ":10011000656EA18444634D454D4102451A0E0AA007\n" + ":1001200000451A00056000A60178184E6F726469D8\n" + ":10013000632053656D69636F6E647563746F7220BD\n" + ":10014000415341026F6E524635344832305F63701E\n" + ":1001500075617070036E6E6F7264696373656D694B\n" + ":100160002E636F6D04781D546865206E52463534D9\n" + ":10017000483230206170706C69636174696F6E2001\n" + ":10018000636F726505781A53616D706C65206170DC\n" + ":10019000706C69636174696F6E20636F726520466D\n" + ":1001A00057066676312E302E30692366696C652ECF\n" + ":1001B00062696E590100C79CAB9DE8337F3014EB38\n" + ":1001C000AC02AF26015E806D88A1DB11A731DFA6EE\n" + ":1001D000ECCB9B480DC834406D30867DE81BEC3C71\n" + ":1001E000F540D0481882119D7C3F6CE58FF1D35DBE\n" + ":1001F000E151F76A0FAF0BBD4C5FA5341A66DB22E5\n" + ":10020000EC63ED4BABC7C8F759D8D69EEC711B24F5\n" + ":1002100020B9AEE13BFCAEB877ACA4573497844F1D\n" + ":1002200058D568086FE39C7E1BD738229848F87A27\n" + ":1002300067B2D9ACC534C127828E42798421374C4C\n" + ":10024000414A0FE27FA06A19133D52227FD62F71D7\n" + ":100250001276AB259CFC6708037CDB18E645F89911\n" + ":10026000C29E2CE39B25A97B09FF005726080A1193\n" + ":1002700042CF82A26B2A99F9719D14195C5C783186\n" + ":1002800060424A181FEC786A9A7C4FCFE85A296579\n" + ":10029000CD013B6D53BBC6DBDAD58FF7F4D9B90A74\n" + ":1002A000034BFF33AB3BC5AFD0B82C0F6AA911B0DD\n" + ":0602B000E8578C92538117\n" ":00000001FF\n" ) diff --git a/tests/test_envelope.py b/tests/test_envelope.py index 1ae35c6b..a7d64dac 100644 --- a/tests/test_envelope.py +++ b/tests/test_envelope.py @@ -21,17 +21,14 @@ TEMP_DIRECTORY = pathlib.Path("test_test_data") ENVELOPE_SIGNED_TWO_TIMES = ( - "D86BA40258BF835824822F5820F429BA01A650F9430D8759CDA5F69DC75D7A389683E986576C75513BACE432D9584AD28443A1" + "D86BA30258BF835824822F5820F429BA01A650F9430D8759CDA5F69DC75D7A389683E986576C75513BACE432D9584AD28443A1" "0126A0F65840149A9C4B1BDAB46F7F46A6200A7F8A46FB2BF6F4F87933E07F9D293C2894ED2F225C83744CBB60337E8858E8F1" "BBBCEEE2642F500A7C28B1B84EC1CD136D081D584AD28443A10126A0F65840D686E1BB235FD660B6421F1076802F93ED17034B" "FD7F55671F46C44C1CD32FBF0007871452EDFEAAEA0FED59885CC3DAC77B081EBA354EF0C323B0C7D03EF0DF0358B6A7010102" "0103586BA2028184414D4102451A0E0AA000451A000560000458548614A401507617DAA571FD5A858F94E28D735CE9F4025008" "C1B59955E85FBC9E767BC29CE1B04D035824822F58201C44B9A9A49B1574BB6C57BDF1F9BA44B79B32ECBB27B4EFCBEFA15652" "DB72E10E04010F020F074382030F094382170211528614A115692366696C652E62696E1502030F17822F5820D396652C143091" - "C81914532F9D55D4D6BDEB8FF366AE734983CBBBC1B1E2750A175892A184414D4102451A0E0AA000451A00056000A60178184E" - "6F726469632053656D69636F6E647563746F7220415341026E6E5246353432305F637075617070036E6E6F7264696373656D69" - "2E636F6D04781C546865206E524635343230206170706C69636174696F6E20636F726505781A53616D706C65206170706C6963" - "6174696F6E20636F7265204657066676312E302E30692366696C652E62696E4428FAF50C" + "C81914532F9D55D4D6BDEB8FF366AE734983CBBBC1B1E2750A692366696C652E62696E4428FAF50C" ) TEST_JSON_STRING_UNSIGNED = """{ diff --git a/tests/test_envelope_api.py b/tests/test_envelope_api.py index 934efe24..bf54bf72 100644 --- a/tests/test_envelope_api.py +++ b/tests/test_envelope_api.py @@ -58,17 +58,14 @@ "ENVELOPE_4_SIGNED_TWO_TIMES": { "filename": "some_envelope.suit", "input": ( - "D86BA40258BF835824822F5820F429BA01A650F9430D8759CDA5F69DC75D7A389683E986576C75513BACE432D9584AD28443A1" + "D86BA30258BF835824822F5820F429BA01A650F9430D8759CDA5F69DC75D7A389683E986576C75513BACE432D9584AD28443A1" "0126A0F65840149A9C4B1BDAB46F7F46A6200A7F8A46FB2BF6F4F87933E07F9D293C2894ED2F225C83744CBB60337E8858E8F1" "BBBCEEE2642F500A7C28B1B84EC1CD136D081D584AD28443A10126A0F65840D686E1BB235FD660B6421F1076802F93ED17034B" "FD7F55671F46C44C1CD32FBF0007871452EDFEAAEA0FED59885CC3DAC77B081EBA354EF0C323B0C7D03EF0DF0358B6A7010102" "0103586BA2028184414D4102451A0E0AA000451A000560000458548614A401507617DAA571FD5A858F94E28D735CE9F4025008" "C1B59955E85FBC9E767BC29CE1B04D035824822F58201C44B9A9A49B1574BB6C57BDF1F9BA44B79B32ECBB27B4EFCBEFA15652" "DB72E10E04010F020F074382030F094382170211528614A115692366696C652E62696E1502030F17822F5820D396652C143091" - "C81914532F9D55D4D6BDEB8FF366AE734983CBBBC1B1E2750A175892A184414D4102451A0E0AA000451A00056000A60178184E" - "6F726469632053656D69636F6E647563746F7220415341026E6E5246353432305F637075617070036E6E6F7264696373656D69" - "2E636F6D04781C546865206E524635343230206170706C69636174696F6E20636F726505781A53616D706C65206170706C6963" - "6174696F6E20636F7265204657066676312E302E30692366696C652E62696E4428FAF50C" + "C81914532F9D55D4D6BDEB8FF366AE734983CBBBC1B1E2750A692366696C652E62696E4428FAF50C" ), "sequence-number": 1, "manifest-version": 1, @@ -79,14 +76,11 @@ "ENVELOPE_5_WITH_MANIFEST_COMPONENT_ID": { "filename": "some_envelope.suit", "input": ( - "d86ba3025827815824822f5820132447d4c398cc4730e28757ac121906e59d6e2bd65bd6912cc776cf17c4f3dc0358cca80101" + "d86ba2025827815824822f5820132447d4c398cc4730e28757ac121906e59d6e2bd65bd6912cc776cf17c4f3dc0358cca80101" "020103586da2028184414d4102451a0e0aa000451a0007f8000458568614a401507617daa571fd5a858f94e28d735ce9f40250" "08c1b59955e85fbc9e767bc29ce1b04d035824822f582056e49482887e2fc2e26d42a2988ea9ddadefc2722bd8669b6f01ca6b" "d0e906db0e190400010f020f074382030f094382170211518614a11568236170702e62696e1502030f17822f5820749fcad1ce" - "af7331328a046dbdf8c76b9f515931154c54087cf057f43e0ef59f058241495008c1b59955e85fbc9e767bc29ce1b04d175894" - "a184414d4102451a0e0aa000451a0007f800a60178184e6f726469632053656d69636f6e647563746f7220415341026f6e5246" - "35344832305f637075617070036e6e6f7264696373656d692e636f6d04781d546865206e52463534483230206170706c696361" - "74696f6e20636f726505781a53616d706c65206170706c69636174696f6e20636f7265204657066676312e302e30" + "af7331328a046dbdf8c76b9f515931154c54087cf057f43e0ef59f058241495008c1b59955e85fbc9e767bc29ce1b04d" ), "sequence-number": 1, "manifest-version": 1, diff --git a/tests/test_hierarchical_manifest.py b/tests/test_hierarchical_manifest.py index 6a2cfe26..3065747e 100644 --- a/tests/test_hierarchical_manifest.py +++ b/tests/test_hierarchical_manifest.py @@ -19,7 +19,7 @@ TEMP_DIRECTORY = pathlib.Path("test_test_data") TEST_BINARY_ENVELOPE = ( - "d86ba5025827815824822f5820ef6346b6fa3dbbc6b1bac072319eeeab1acbc70a6d5e0e1c4b14f1a145688e3703590172a8010" + "d86ba4025827815824822f5820ef6346b6fa3dbbc6b1bac072319eeeab1acbc70a6d5e0e1c4b14f1a145688e3703590172a8010" "10201035894a30283824143410082414950816aa0a0af115ef2858afeb668b2e9c98241495008c1b59955e85fbc9e767bc29ce1" "b04d0458598e0c0114a201507617daa571fd5a858f94e28d735ce9f40250816aa0a0af115ef2858afeb668b2e9c90c0214a2015" "07617daa571fd5a858f94e28d735ce9f4025008c1b59955e85fbc9e767bc29ce1b04d0c820102010f020f01a300a001a002a007" @@ -27,25 +27,17 @@ "0e3e9b65a4e52851592e15c05c4b10a0dfd0c407c7f6b2f3bda8cd30e1901911502030f070f0b0f14a31569236170702e737569" "74035824822f58202fa1276150be7c8ff9fd7e69da5478afe2254ea41d3d0447962a1e436e49a3570e19019f1502030f070f0b0" "f17822f582013715bae35ede2aeca791d1fcd87c96379c2fe8396d90e1c09566477f2dc442e05824149503f6a3a4dcdfa58c5ac" - "cef9f584c41124175877a18241434100a60178184e6f726469632053656d69636f6e647563746f722041534102686e524635344" - "83230036e6e6f7264696373656d692e636f6d04781a546865206e5246353448323020726f6f74206d616e696665737405745361" - "6d706c6520726f6f74206d616e6966657374066676312e302e3069237261642e73756974590191d86ba4025827815824822f582" - "02c245b791cba9274bf8dabebda417c124bee196f495719bdb0ccdcea5017a7c10358caa80101020103586ba2028184414d4103" - "451a0e054000451a000558000458548614a401507617daa571fd5a858f94e28d735ce9f40250816aa0a0af115ef2858afeb668b" - "2e9c9035824822f58205f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa8139530e04010f020f07438203" - "0f094382170211518614a11568237261642e62696e1502030f17822f5820cd54d1bbb4d891e79f3562d1e4e231afef4fa47f5f3" - "85546ddc87d9c83d23c440582414950816aa0a0af115ef2858afeb668b2e9c9175886a184414d4103451a0e054000451a000558" - "00a60178184e6f726469632053656d69636f6e647563746f7220415341026f6e524635344832305f637075726164036e6e6f726" - "4696373656d692e636f6d0477546865206e5246353448323020726164696f20636f7265057453616d706c6520726164696f2063" - "6f7265204657066676312e302e3068237261642e62696e44deadbeef69236170702e7375697459019fd86ba4025827815824822" - "f5820d700dcc82c273faa2ec6956154a6730d4ff77c73579a7ae33b4288248fa06c7f0358caa80101020103586ba2028184414d" - "4102451a0e0aa000451a0007f8000458548614a401507617daa571fd5a858f94e28d735ce9f4025008c1b59955e85fbc9e767bc" - "29ce1b04d035824822f58200d5bc580d89a8f2b24b4cefacc724dbb969f8b13833a4fcc507b93d1bfe66c510e04010f020f0743" - "82030f094382170211518614a11568236170702e62696e1502030f17822f58201d714f2dacd1880bcee0b7000d1c2485ae95e72" - "d22f9e083e13b569e8f95e15c058241495008c1b59955e85fbc9e767bc29ce1b04d175894a184414d4102451a0e0aa000451a00" - "07f800a60178184e6f726469632053656d69636f6e647563746f7220415341026f6e524635344832305f637075617070036e6e6" - "f7264696373656d692e636f6d04781d546865206e52463534483230206170706c69636174696f6e20636f726505781a53616d70" - "6c65206170706c69636174696f6e20636f7265204657066676312e302e3068236170702e62696e44c0ffee00" + "cef9f584c4112469237261642e73756974590108d86ba3025827815824822f58202c245b791cba9274bf8dabebda417c124bee1" + "96f495719bdb0ccdcea5017a7c10358caa80101020103586ba2028184414d4103451a0e054000451a000558000458548614a401" + "507617daa571fd5a858f94e28d735ce9f40250816aa0a0af115ef2858afeb668b2e9c9035824822f58205f78c33274e43fa9de5" + "659265c1d917e25c03722dcb0b8d27db8d5feaa8139530e04010f020f074382030f094382170211518614a11568237261642e62" + "696e1502030f17822f5820cd54d1bbb4d891e79f3562d1e4e231afef4fa47f5f385546ddc87d9c83d23c440582414950816aa0a" + "0af115ef2858afeb668b2e9c968237261642e62696e44deadbeef69236170702e73756974590108d86ba3025827815824822f58" + "20d700dcc82c273faa2ec6956154a6730d4ff77c73579a7ae33b4288248fa06c7f0358caa80101020103586ba2028184414d410" + "2451a0e0aa000451a0007f8000458548614a401507617daa571fd5a858f94e28d735ce9f4025008c1b59955e85fbc9e767bc29c" + "e1b04d035824822f58200d5bc580d89a8f2b24b4cefacc724dbb969f8b13833a4fcc507b93d1bfe66c510e04010f020f0743820" + "30f094382170211518614a11568236170702e62696e1502030f17822f58201d714f2dacd1880bcee0b7000d1c2485ae95e72d22" + "f9e083e13b569e8f95e15c058241495008c1b59955e85fbc9e767bc29ce1b04d68236170702e62696e44c0ffee00" ) TEST_JSON_STRING_UNSIGNED = """{ @@ -314,13 +306,15 @@ ] }, "suit-text": { - "[\\"M\\", 3, 235225088, 350208]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20_cpurad", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 radio core", - "suit-text-component-description": "Sample radio core FW", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"M\\", 3, 235225088, 350208]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20_cpurad", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 radio core", + "suit-text-component-description": "Sample radio core FW", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-payloads": { @@ -442,13 +436,15 @@ ] }, "suit-text": { - "[\\"M\\", 3, 235225088, 350208]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20_cpurad", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 radio core", - "suit-text-component-description": "Sample radio core FW", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"M\\", 3, 235225088, 350208]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20_cpurad", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 radio core", + "suit-text-component-description": "Sample radio core FW", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-payloads": { @@ -605,13 +601,15 @@ ] }, "suit-text": { - "[\\"M\\", 2, 235577344, 522240]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"M\\", 2, 235577344, 522240]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-payloads": { @@ -733,13 +731,15 @@ ] }, "suit-text": { - "[\\"M\\", 2, 235577344, 522240]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"M\\", 2, 235577344, 522240]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-payloads": { @@ -794,13 +794,15 @@ ] }, "suit-text": { - "[\\"C\\", 0]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 root manifest", - "suit-text-component-description": "Sample root manifest", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"C\\", 0]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 root manifest", + "suit-text-component-description": "Sample root manifest", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-dependencies": { @@ -915,13 +917,15 @@ ] }, "suit-text": { - "[\\"M\\", 3, 235225088, 350208]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20_cpurad", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 radio core", - "suit-text-component-description": "Sample radio core FW", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"M\\", 3, 235225088, 350208]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20_cpurad", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 radio core", + "suit-text-component-description": "Sample radio core FW", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-payloads": { @@ -1040,13 +1044,15 @@ ] }, "suit-text": { - "[\\"M\\", 2, 235577344, 522240]": { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF54H20_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF54H20 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0" + "en": { + "[\\"M\\", 2, 235577344, 522240]": { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF54H20_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF54H20 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0" + } } }, "suit-integrated-payloads": { @@ -1284,13 +1290,14 @@ namespace: nordicsemi.com name: nRF54H20_sample_app suit-text: - '["M", 2, 235577344, 522240]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpuapp - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 application core - suit-text-component-description: Sample application core FW - suit-text-component-version: v1.0.0 + en: + '["M", 2, 235577344, 522240]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpuapp + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 application core + suit-text-component-description: Sample application core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#app.bin': app.bin radio_envelope: &rad @@ -1358,13 +1365,14 @@ namespace: nordicsemi.com name: nRF54H20_sample_rad suit-text: - '["M", 3, 235225088, 350208]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpurad - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 radio core - suit-text-component-description: Sample radio core FW - suit-text-component-version: v1.0.0 + en: + '["M", 3, 235225088, 350208]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpurad + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 radio core + suit-text-component-description: Sample radio core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#rad.bin': rad.bin SUIT_Envelope_Tagged: @@ -1513,13 +1521,14 @@ namespace: nordicsemi.com name: nRF54H20_sample_root suit-text: - '["C", 0]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20 - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 root manifest - suit-text-component-description: Sample root manifest - suit-text-component-version: v1.0.0 + en: + '["C", 0]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20 + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 root manifest + suit-text-component-description: Sample root manifest + suit-text-component-version: v1.0.0 suit-integrated-dependencies: '#rad.suit': *rad '#app.suit': *app @@ -1592,13 +1601,14 @@ namespace: nordicsemi.com name: nRF54H20_sample_rad suit-text: - '["M", 3, 235225088, 350208]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20_cpurad - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 radio core - suit-text-component-description: Sample radio core FW - suit-text-component-version: v1.0.0 + en: + '["M", 3, 235225088, 350208]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20_cpurad + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 radio core + suit-text-component-description: Sample radio core FW + suit-text-component-version: v1.0.0 suit-integrated-payloads: '#rad.bin': rad.bin SUIT_Envelope_Tagged: @@ -1747,28 +1757,26 @@ namespace: nordicsemi.com name: nRF54H20_sample_root suit-text: - '["C", 0]': - suit-text-vendor-name: Nordic Semiconductor ASA - suit-text-model-name: nRF54H20 - suit-text-vendor-domain: nordicsemi.com - suit-text-model-info: The nRF54H20 root manifest - suit-text-component-description: Sample root manifest - suit-text-component-version: v1.0.0 + en: + '["C", 0]': + suit-text-vendor-name: Nordic Semiconductor ASA + suit-text-model-name: nRF54H20 + suit-text-vendor-domain: nordicsemi.com + suit-text-model-info: The nRF54H20 root manifest + suit-text-component-description: Sample root manifest + suit-text-component-version: v1.0.0 suit-integrated-dependencies: '#rad.suit': *rad '#app.suit': *app """ TEST_BINARY_SUB_ENVELOPE_APP = ( - "D86BA4025827815824822F58201D15A6F8E2026C28E1E165D203523F80D9AC2DC5E92486FA88BEB02D595494AC0358CAA801010" + "D86BA3025827815824822F58201D15A6F8E2026C28E1E165D203523F80D9AC2DC5E92486FA88BEB02D595494AC0358CAA801010" "20103586BA2028184414D4102451A0E0AA000451A0007F8000458548614A401507617DAA571FD5A858F94E28D735CE9F4025008" "C1B59955E85FBC9E767BC29CE1B04D035824822F58200D5BC580D89A8F2B24B4CEFACC724DBB969F8B13833A4FCC507B93D1BFE" "66C510E04010F020F074382030F094382170211518614A11568236170702E62696E1502030F17822F5820749FCAD1CEAF733132" - "8A046DBDF8C76B9F515931154C54087CF057F43E0EF59F058241495008C1B59955E85FBC9E767BC29CE1B04D175894A184414D4" - "102451A0E0AA000451A0007F800A60178184E6F726469632053656D69636F6E647563746F7220415341026F6E52463534483230" - "5F637075617070036E6E6F7264696373656D692E636F6D04781D546865206E52463534483230206170706C69636174696F6E206" - "36F726505781A53616D706C65206170706C69636174696F6E20636F7265204657066676312E302E3068236170702E62696E44C0" - "FFEE00" + "8A046DBDF8C76B9F515931154C54087CF057F43E0EF59F058241495008C1B59955E85FBC9E767BC29CE1B04D68236170702E626" + "96E44C0FFEE00" ) diff --git a/tests/test_ncs_sign_script.py b/tests/test_ncs_sign_script.py index f20efd12..abd393b9 100644 --- a/tests/test_ncs_sign_script.py +++ b/tests/test_ncs_sign_script.py @@ -109,13 +109,10 @@ "2E62696E150217822F4005824149500DAB491F1E1F53D4AEA1CA3C67A4EBE5" ), "ENVELOPE_6_UNSIGNED_COMPONENT_LIST": ( - "d86ba3025827815824822f582071395a66f9cb583dbdc797ad6cd5d101531b14c082802b491c5c6745774c748003588a" + "d86ba2025827815824822f582071395a66f9cb583dbdc797ad6cd5d101531b14c082802b491c5c6745774c748003588a" "a701010201035844a2028184414d4102451a0e054000451a0005600004582d8614a301507617daa571fd5a858f94e28d" "735ce9f40250d622bafd4337518590bc6368cda7fbca0e00010f020f074382030f0943821702114d8214a11568236170" - "702e62696e17822f58202ba46bc4a70d125b30c4227985578eb6a889807a939cc148b4d8110d4f2ed940175893a18441" - "4d4102451a0e054000451a00056000a60178184e6f726469632053656d69636f6e647563746f7220415341026e6e5246" - "353432305f637075617070036e6e6f7264696373656d692e636f6d04781d546865206e52463533383430206170706c69" - "636174696f6e20636f726505781a53616d706c65206170706c69636174696f6e20636f7265204657066676312e302e30" + "702e62696e17822f58202ba46bc4a70d125b30c4227985578eb6a889807a939cc148b4d8110d4f2ed940" ), "ENVELOPE_7_UNSIGNED_TWO_INTEGRATED_PAYLOADS": ( "D86BA4025827815824822F582087EC80F16398B14294B0978D507DB9E4FF23C00463C072762B32D4A30212CCFA0359010FA601" diff --git a/tests/test_suit_envelope.py b/tests/test_suit_envelope.py index 7718cedd..c9a40a57 100644 --- a/tests/test_suit_envelope.py +++ b/tests/test_suit_envelope.py @@ -34,26 +34,27 @@ "65ff4359904a8e914e5288d6777700c0f535ea2917822f582001cd94dd091d5d9a0986c43ecb93aa119fef6d7" "04111efe09eb4dd4a9b67037d11586f8614a1157865687474703a2f2f6578616d706c652e636f6d2f76657279" "2f6c6f6e672f706174682f746f2f66696c652f66696c652f3132332f3435362f3738392f6162632f6465662f6" - "768692f6a6b6c2f6d6e6f2f7072732f7475762f7778792f7a2f66696c652e62696e1502030f1759019da20179" - "01727465737420656e76656c6f706520666f7220737569742d67656e657261746f722c2077697468207665727" - "9206c6f6e6720737472696e67206162636465666768696a6b6c6d6f6e6f70727374757778797a313233343536" - "3738396162636465666768696a6b6c6d6f6e6f70727374757778797a313233343536373839616263646566676" - "8696a6b6c6d6f6e6f70727374757778797a3132333435363738396162636465666768696a6b6c6d6f6e6f7072" - "7374757778797a3132333435363738396162636465666768696a6b6c6d6f6e6f70727374757778797a3132333" - "435363738396162636465666768696a6b6c6d6f6e6f70727374757778797a3132333435363738396162636465" - "666768696a6b6c6d6f6e6f70727374757778797a3132333435363738396162636465666768696a6b6c6d6f6e6" - "f70727374757778797a3132333435363738396162636465666768696a6b6c6d6f6e6f70727374757778797a31" - "32333435363738395c6e5c6e5c6e5c6e814100a4036e6e6f7264696373656d692e636f6d04647375697405647" - "4657374066476313233" + "768692f6a6b6c2f6d6e6f2f7072732f7475762f7778792f7a2f66696c652e62696e1502030f175901a1a16265" + "6ea2017901727465737420656e76656c6f706520666f7220737569742d67656e657261746f722c20776974682" + "076657279206c6f6e6720737472696e67206162636465666768696a6b6c6d6f6e6f70727374757778797a3132" + "333435363738396162636465666768696a6b6c6d6f6e6f70727374757778797a3132333435363738396162636" + "465666768696a6b6c6d6f6e6f70727374757778797a3132333435363738396162636465666768696a6b6c6d6f" + "6e6f70727374757778797a3132333435363738396162636465666768696a6b6c6d6f6e6f70727374757778797" + "a3132333435363738396162636465666768696a6b6c6d6f6e6f70727374757778797a31323334353637383961" + "62636465666768696a6b6c6d6f6e6f70727374757778797a3132333435363738396162636465666768696a6b6" + "c6d6f6e6f70727374757778797a3132333435363738396162636465666768696a6b6c6d6f6e6f707273747577" + "78797a3132333435363738395c6e5c6e5c6e5c6e814100a4036e6e6f7264696373656d692e636f6d046473756" + "974056474657374066476313233" ), "ENVELOPE_3_UNSIGNED": ( "d86ba3025827815824822f5820967fb04cc65b3bae64b716120547e07eaef68bec44823e39094ade741849ff8c" "03587fa701010201035839a2028181441e05400004582d8614a301507617daa571fd5a858f94e28d735ce9f402" "50d622bafd4337518590bc6368cda7fbca0e00010f020f074382030f0943821702114d8214a11568236170702e" - "62696e17822f5820cf695600628b16e2b8dbecddf389c27dd82ec92ef17ce935d7de931016a36708175888a181" - "441e054000a60178184e6f726469632053656d69636f6e647563746f7220415341026e6e5246353432305f6370" - "75617070036e6e6f7264696373656d692e636f6d04781d546865206e52463533383430206170706c6963617469" - "6f6e20636f726505781a53616d706c65206170706c69636174696f6e20636f7265204657066676312e302e30" + "62696e17822f5820cf695600628b16e2b8dbecddf389c27dd82ec92ef17ce935d7de931016a3670817588ca162" + "656ea181441e054000a60178184e6f726469632053656d69636f6e647563746f7220415341026e6e5246353432" + "305f637075617070036e6e6f7264696373656d692e636f6d04781d546865206e52463533383430206170706c69" + "636174696f6e20636f726505781a53616d706c65206170706c69636174696f6e20636f7265204657066676312e" + "302e30" ), "ENVELOPE_4_UNSIGNED_NEGATIVE_SEQUENCE_NUMBER": ( "d86ba3025827815824822f5820650e145465da84115e4de59496f55016a94b9e37e30260a606e486215e4c85650" @@ -75,10 +76,11 @@ "d86ba3025827815824822f582071395a66f9cb583dbdc797ad6cd5d101531b14c082802b491c5c6745774c748003588a" "a701010201035844a2028184414d4102451a0e054000451a0005600004582d8614a301507617daa571fd5a858f94e28d" "735ce9f40250d622bafd4337518590bc6368cda7fbca0e00010f020f074382030f0943821702114d8214a11568236170" - "702e62696e17822f58202ba46bc4a70d125b30c4227985578eb6a889807a939cc148b4d8110d4f2ed940175893a18441" - "4d4102451a0e054000451a00056000a60178184e6f726469632053656d69636f6e647563746f7220415341026e6e5246" - "353432305f637075617070036e6e6f7264696373656d692e636f6d04781d546865206e52463533383430206170706c69" - "636174696f6e20636f726505781a53616d706c65206170706c69636174696f6e20636f7265204657066676312e302e30" + "702e62696e17822f58202ba46bc4a70d125b30c4227985578eb6a889807a939cc148b4d8110d4f2ed940175897a16265" + "6ea184414d4102451a0e054000451a00056000a60178184e6f726469632053656d69636f6e647563746f722041534102" + "6e6e5246353432305f637075617070036e6e6f7264696373656d692e636f6d04781d546865206e524635333834302061" + "70706c69636174696f6e20636f726505781a53616d706c65206170706c69636174696f6e20636f726520465706667631" + "2e302e30" ), "ENVELOPE_7_UNSIGNED_TWO_INTEGRATED_PAYLOADS": ( "D86BA4025827815824822F582087EC80F16398B14294B0978D507DB9E4FF23C00463C072762B32D4A30212CCFA0359010FA601" @@ -98,10 +100,10 @@ "0103586BA2028184414D4102451A0E0AA000451A000560000458548614A401507617DAA571FD5A858F94E28D735CE9F4025008" "C1B59955E85FBC9E767BC29CE1B04D035824822F58201C44B9A9A49B1574BB6C57BDF1F9BA44B79B32ECBB27B4EFCBEFA15652" "DB72E10E04010F020F074382030F094382170211528614A115692366696C652E62696E1502030F17822F5820D396652C143091" - "C81914532F9D55D4D6BDEB8FF366AE734983CBBBC1B1E2750A175892A184414D4102451A0E0AA000451A00056000A60178184E" - "6F726469632053656D69636F6E647563746F7220415341026E6E5246353432305F637075617070036E6E6F7264696373656D69" - "2E636F6D04781C546865206E524635343230206170706C69636174696F6E20636F726505781A53616D706C65206170706C6963" - "6174696F6E20636F7265204657066676312E302E30692366696C652E62696E4428FAF50C" + "C81914532F9D55D4D6BDEB8FF366AE734983CBBBC1B1E2750A175896A162656EA184414D4102451A0E0AA000451A00056000A6" + "0178184E6F726469632053656D69636F6E647563746F7220415341026E6E5246353432305F637075617070036E6E6F72646963" + "73656D692E636F6D04781C546865206E524635343230206170706C69636174696F6E20636F726505781A53616D706C65206170" + "706C69636174696F6E20636F7265204657066676312E302E30692366696C652E62696E4428FAF50C" ), "ENVELOPE_9_UNSIGNED_PROTECTED_KEY_ID": ( "D86BA202581B8247822F44DEADBEEF51D28447A201260442187BA0F644DEADBEEF03584BA40101020103583EA2028184414D41" @@ -124,30 +126,30 @@ "469fd190ee539ca318681b03695e36035824822f58209c4b47c223b27e796d430b2078322f4069ded55f3d4092180f20dec90a" "61c9ff0e190400010f020f074382030f094382170211528614a115692366696c652e62696e1502030f17822f582040c4a598cc" "3b9c6030bb008f7eb3bda61af4e7af09a83cad2eb5fae5b0517a8905824c6b494e53544c445f4d465354505b469fd190ee539c" - "a318681b03695e3617587fa18444634d454d4100451a000800004100a60178184e6f726469632053656d69636f6e647563746f" - "7220415341026474657374036e6e6f7264696373656d692e636f6d04745468652074657374206170706c69636174696f6e0578" - "1b53616d706c65206170706c69636174696f6e20666f722074657374066676312e302e30692366696c652e62696e5904007709" - "a634cd52952ec31109b6d1586c3541866ec9a34f88cc461af8ff9cce9c5552f24f635964347b50049a9da998d075fe2c927ae8" - "e4eb092f1115cfc07b928b7fed4e694f627ff049acca5af5bb419b36a39267abe8dd43650c97da329e0a719fd9a9e924372f27" - "0ed13b191e2125761e28187f92342d4a96fe11290162f2da03a8ecce8d914f771e4ce9f298dd50440b9df464f1939129fb1bff" - "cceeed4195474871e2e5b7916880c3771af2c997b0731272db3fff34f0d999476a3554716915bf84ec9de84e6ce2b8b2e891cb" - "af418ab5121e8ccbb0b24cb403b25e8da7a68588ce00694c95e1a5150d8e37189b5b52d283b603c40b6e74ca408ae41a08ce7f" - "d938c539dad8ee410c5f84f566c96f4bf72f6476565ea34f9a3ac5c5e51a8a70000315447eb05b1d7e3741156e1c738463057f" - "bb5defe72d9d4274bf480866bf0401db047f0b247d4fb409f1ca9b3527856c30d9333812822fe2163cbdbe850e548a41c252f4" - "2a94123823f96232d8ca92cdec0d863ef4dcbd577ac62fa47688db60bc9fd2ac3d4c6df655854f67b7c46ebfaae9f6304830d3" - "64d906bbee9153d19a82ab745cb2ae64cbe72af5bf08f10a31c001f0191e55ae853178a19f7bb36f14b6ff5807c817f366bd3a" - "7d9b3942f14082a3048738069896884737c193f18fc6b82689cc9a3a4309f8ea42e8c2b0f63e1aa0ac01c3f336df8dab4208aa" - "342c73c623d34740ef3fdca59bdc76c334b3831270c8cec19f15f35013774cb6f47af25240f0be1c7949dd59610b0694d41d20" - "9e81cc81986f8f9947c65563e5d0e1877dbc3efd6a96a7e1c3963dfee53fd2c05d08077afd3babe20b2d5a061d0237085d3d65" - "41073ede5088f5b636c6ad4c8b94b20a52a645913af8d640627a7ce2998c1350c5077fb0d07ff435699c63c1238d1b0fea2b4c" - "6d8565ee20e8de24dc7f3c8fbad5df8f6b711e93e3a34c623682a24f88bfe5323c814cf002e97209186b56215b5df7047b8f5e" - "fd5ca4864334e6d9d315d712dabe9f602850dc7bbc62a566e11587c9b88394748ec3296a2b8278659d9f6ed7fdb8bcd90b1a33" - "b32228509fdcd42fb83ace9d6a3d85413c4c1c5a5b361d695ba14d14372faae693b70776995d112f721e2595ee4796382b2aee" - "f18c828f8dc4eb4db33705617c7f65a9c186566021281de12b14a86a7d67be441d8f529295c7e2bd0936dfde05cab5017b9f00" - "3505fe680088e85f10acad86377cb44e1d80e4e5437e47df366b6afb721c584681fba59e6258cc5a685d07f8c83ad5c9e3e2c1" - "b24de8c6a70436d47134c76c97b757cce27852208194f31d3806b74b949b3281fe3c669f16ba00628015acbbf1b30715012e3e" - "d0e789b2c6a6f660d556a6f3441c29bfa6582b981c7b54252c7052c20b8f5a436415eedfb84ac742e7444dd8bfe2eae0d084f7" - "09c2" + "a318681b03695e36175883a162656ea18444634d454d4100451a000800004100a60178184e6f726469632053656d69636f6e64" + "7563746f7220415341026474657374036e6e6f7264696373656d692e636f6d04745468652074657374206170706c6963617469" + "6f6e05781b53616d706c65206170706c69636174696f6e20666f722074657374066676312e302e30692366696c652e62696e59" + "04007709a634cd52952ec31109b6d1586c3541866ec9a34f88cc461af8ff9cce9c5552f24f635964347b50049a9da998d075fe" + "2c927ae8e4eb092f1115cfc07b928b7fed4e694f627ff049acca5af5bb419b36a39267abe8dd43650c97da329e0a719fd9a9e9" + "24372f270ed13b191e2125761e28187f92342d4a96fe11290162f2da03a8ecce8d914f771e4ce9f298dd50440b9df464f19391" + "29fb1bffcceeed4195474871e2e5b7916880c3771af2c997b0731272db3fff34f0d999476a3554716915bf84ec9de84e6ce2b8" + "b2e891cbaf418ab5121e8ccbb0b24cb403b25e8da7a68588ce00694c95e1a5150d8e37189b5b52d283b603c40b6e74ca408ae4" + "1a08ce7fd938c539dad8ee410c5f84f566c96f4bf72f6476565ea34f9a3ac5c5e51a8a70000315447eb05b1d7e3741156e1c73" + "8463057fbb5defe72d9d4274bf480866bf0401db047f0b247d4fb409f1ca9b3527856c30d9333812822fe2163cbdbe850e548a" + "41c252f42a94123823f96232d8ca92cdec0d863ef4dcbd577ac62fa47688db60bc9fd2ac3d4c6df655854f67b7c46ebfaae9f6" + "304830d364d906bbee9153d19a82ab745cb2ae64cbe72af5bf08f10a31c001f0191e55ae853178a19f7bb36f14b6ff5807c817" + "f366bd3a7d9b3942f14082a3048738069896884737c193f18fc6b82689cc9a3a4309f8ea42e8c2b0f63e1aa0ac01c3f336df8d" + "ab4208aa342c73c623d34740ef3fdca59bdc76c334b3831270c8cec19f15f35013774cb6f47af25240f0be1c7949dd59610b06" + "94d41d209e81cc81986f8f9947c65563e5d0e1877dbc3efd6a96a7e1c3963dfee53fd2c05d08077afd3babe20b2d5a061d0237" + "085d3d6541073ede5088f5b636c6ad4c8b94b20a52a645913af8d640627a7ce2998c1350c5077fb0d07ff435699c63c1238d1b" + "0fea2b4c6d8565ee20e8de24dc7f3c8fbad5df8f6b711e93e3a34c623682a24f88bfe5323c814cf002e97209186b56215b5df7" + "047b8f5efd5ca4864334e6d9d315d712dabe9f602850dc7bbc62a566e11587c9b88394748ec3296a2b8278659d9f6ed7fdb8bc" + "d90b1a33b32228509fdcd42fb83ace9d6a3d85413c4c1c5a5b361d695ba14d14372faae693b70776995d112f721e2595ee4796" + "382b2aeef18c828f8dc4eb4db33705617c7f65a9c186566021281de12b14a86a7d67be441d8f529295c7e2bd0936dfde05cab5" + "017b9f003505fe680088e85f10acad86377cb44e1d80e4e5437e47df366b6afb721c584681fba59e6258cc5a685d07f8c83ad5" + "c9e3e2c1b24de8c6a70436d47134c76c97b757cce27852208194f31d3806b74b949b3281fe3c669f16ba00628015acbbf1b307" + "15012e3ed0e789b2c6a6f660d556a6f3441c29bfa6582b981c7b54252c7052c20b8f5a436415eedfb84ac742e7444dd8bfe2ea" + "e0d084f709c2" ), "ENVELOPE_12_CBOR_MEMORY_ERROR_NCSDK-24195_2": ( "d86ba3025827815824822f5820abe742c95d30b5d0dcc33e03cc939e563b41673cd9c6d0c6d06a5300c9af182e0358d5a80101" @@ -155,9 +157,9 @@ "469fd190ee539ca318681b03695e36035824822f58209c4b47c223b27e796d430b2078322f4069ded55f3d4092180f20dec90a" "61c9ff0e190400010f020f074382030f094382170211528614a115692366696c652e62696e1502030f17822f582040c4a598cc" "3b9c6030bb008f7eb3bda61af4e7af09a83cad2eb5fae5b0517a8905824c6b494e53544c445f4d4653544e5b676a1b1b1b1b1b" - "1b1b1ba4969617587fa18444634d454d4100451a000800004100a60178184e6f726469632053656d69636f6e647563746f7220" - "415341026474657374036e6e6f7264696373656d692e636f6d04745468652074657374206170706c69636174696f6e05781b53" - "616d706c65206170706c69636174696f6e20666f722074657374066676312e302e30" + "1b1b1ba49696175883a162656ea18444634d454d4100451a000800004100a60178184e6f726469632053656d69636f6e647563" + "746f7220415341026474657374036e6e6f7264696373656d692e636f6d04745468652074657374206170706c69636174696f6e" + "05781b53616d706c65206170706c69636174696f6e20666f722074657374066676312e302e30" ), "ENVELOPE_13_SHORT_ENVELOPE": ( "d86ba2025827815824822f5820d0c5d63342e9d4d9a55ffdfa86cbd39e1b0433e3683e47d517b0f4a2334124d8035828a40101" @@ -257,13 +259,15 @@ ], }, "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, "suit-integrated-payloads": {"#file.bin": "file.bin"}, @@ -331,13 +335,15 @@ "suit-invoke": [{"suit-directive-set-component-index": 0}, {"suit-directive-invoke": []}], }, "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, "suit-integrated-payloads": {"#file.bin": "file.bin", "#file2.bin": "file.bin"}, @@ -470,13 +476,15 @@ {"suit-condition-image-match": []}, ], "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, "suit-validate": [{"suit-directive-set-component-index": 1}, {"suit-condition-image-match": []}], diff --git a/tests/test_suit_envelope_severable.py b/tests/test_suit_envelope_severable.py index 4f0c0a93..1c003ba7 100644 --- a/tests/test_suit_envelope_severable.py +++ b/tests/test_suit_envelope_severable.py @@ -55,13 +55,15 @@ }, }, "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, "suit-integrated-payloads": {"#file.bin": "file.bin"}, @@ -235,13 +237,15 @@ {"suit-directive-override-parameters": {"suit-parameter-uri": "#file.bin"}}, ], "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, "suit-integrated-payloads": {"#file.bin": "file.bin"}, @@ -288,13 +292,15 @@ {"suit-directive-override-parameters": {"suit-parameter-uri": "#file.bin"}}, ], "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, "suit-integrated-payloads": {"#file.bin": "file.bin"}, @@ -338,13 +344,15 @@ {"suit-directive-override-parameters": {"suit-parameter-uri": "#file.bin"}}, ], "suit-text": { - '["M", 2, 235577344, 352256]': { - "suit-text-vendor-name": "Nordic Semiconductor ASA", - "suit-text-model-name": "nRF5420_cpuapp", - "suit-text-vendor-domain": "nordicsemi.com", - "suit-text-model-info": "The nRF5420 application core", - "suit-text-component-description": "Sample application core FW", - "suit-text-component-version": "v1.0.0", + "en": { + '["M", 2, 235577344, 352256]': { + "suit-text-vendor-name": "Nordic Semiconductor ASA", + "suit-text-model-name": "nRF5420_cpuapp", + "suit-text-vendor-domain": "nordicsemi.com", + "suit-text-model-info": "The nRF5420 application core", + "suit-text-component-description": "Sample application core FW", + "suit-text-component-version": "v1.0.0", + } } }, }, @@ -358,25 +366,25 @@ "d86ba402458143822f400358a5a501010201035857a2028384414d4218ff451a0e054000451a0005600084414" "d410e451a2e054000451a000560008241444100045829840c0114a201507617daa571fd5a858f94e28d735ce9" "f40250d622bafd4337518590bc6368cda7fbca11581e900c0214a115692366696c652e62696e150003000c011" - "4a116021600030017822f582014c4294eeb65ab31a431b5d7e1847c001319dba6cd67b439bc61825852250c97" - "175892a184414d4102451a0e0aa000451a00056000a60178184e6f726469632053656d69636f6e647563746f7" - "220415341026e6e5246353432305f637075617070036e6e6f7264696373656d692e636f6d04781c546865206e" - "524635343230206170706c69636174696f6e20636f726505781a53616d706c65206170706c69636174696f6e2" - "0636f7265204657066676312e302e30692366696c652e62696e5820b75168e24cebca5f203ea92bd356e60375" - "ea18765999d1274dace20c7a81a12c" + "4a116021600030017822f5820aac171d7a184ecd31c01495ac6b656b2e60a5aa43de6f6d1c9acdac29bb540c2" + "175896a162656ea184414d4102451a0e0aa000451a00056000a60178184e6f726469632053656d69636f6e647" + "563746f7220415341026e6e5246353432305f637075617070036e6e6f7264696373656d692e636f6d04781c54" + "6865206e524635343230206170706c69636174696f6e20636f726505781a53616d706c65206170706c6963617" + "4696f6e20636f7265204657066676312e302e30692366696c652e62696e5820b75168e24cebca5f203ea92bd3" + "56e60375ea18765999d1274dace20c7a81a12c" ), "ENVELOPE_2_SEVERED_TEXT_FETCH_INSTALL": ( "d86ba602458143822f400358cea601010201035857a2028384414d4218ff451a0e054000451a0005600084414" "d410e451a2e054000451a000560008241444100045829840c0114a201507617daa571fd5a858f94e28d735ce9" "f40250d622bafd4337518590bc6368cda7fbca11822f5820f0b65173c03a9c481a0fe3ea62ed744bcfb0bef21" "43d4380e52dd67d5ee4200d10822f5820814a3a9e09cf691e5fa77c315c0a69a9929ee86601d5dfdca8b24819" - "e0be745917822f582014c4294eeb65ab31a431b5d7e1847c001319dba6cd67b439bc61825852250c9711581e9" + "e0be745917822f5820aac171d7a184ecd31c01495ac6b656b2e60a5aa43de6f6d1c9acdac29bb540c211581e9" "00c0214a115692366696c652e62696e150003000c0114a11602160003001050840c0214a115692366696c652e" - "62696e175892a184414d4102451a0e0aa000451a00056000a60178184e6f726469632053656d69636f6e64756" - "3746f7220415341026e6e5246353432305f637075617070036e6e6f7264696373656d692e636f6d04781c5468" - "65206e524635343230206170706c69636174696f6e20636f726505781a53616d706c65206170706c696361746" - "96f6e20636f7265204657066676312e302e30692366696c652e62696e5820b75168e24cebca5f203ea92bd356" - "e60375ea18765999d1274dace20c7a81a12c" + "62696e175896a162656ea184414d4102451a0e0aa000451a00056000a60178184e6f726469632053656d69636" + "f6e647563746f7220415341026e6e5246353432305f637075617070036e6e6f7264696373656d692e636f6d04" + "781c546865206e524635343230206170706c69636174696f6e20636f726505781a53616d706c65206170706c6" + "9636174696f6e20636f7265204657066676312e302e30692366696c652e62696e5820b75168e24cebca5f203e" + "a92bd356e60375ea18765999d1274dace20c7a81a12c" ), } @@ -390,7 +398,7 @@ def test_severable_digest_value(): .SuitManifest[suit_text] .value.SuitDigest.SuitDigestRaw[1] .value.hex() - == "14c4294eeb65ab31a431b5d7e1847c001319dba6cd67b439bc61825852250c97" + == "aac171d7a184ecd31c01495ac6b656b2e60a5aa43de6f6d1c9acdac29bb540c2" )