From 640aae26b155d70d20deaa7c9a6e87fb61f412e8 Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Tue, 10 Dec 2024 13:00:55 +0100 Subject: [PATCH] manifest: Allow to use int as MFST_VAR values Allow to set content using integer values inside manifest templates. Ref: NCSDK-30807 Signed-off-by: Tomasz Chyrowicz --- suit_generator/suit/manifest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/suit_generator/suit/manifest.py b/suit_generator/suit/manifest.py index 0750fe1..61868c6 100644 --- a/suit_generator/suit/manifest.py +++ b/suit_generator/suit/manifest.py @@ -278,6 +278,12 @@ class SuitParameterInvokeArgs(SuitKeyValue): ) +class SuitParameterContent(SuitUnion): + """Abstract element to define possible sub-elements.""" + + _metadata = Metadata(children=[cbstr(SuitUint), SuitBstr]) + + class SuitParameters(SuitKeyValue): """Representation of SUIT parameters.""" @@ -290,7 +296,7 @@ class SuitParameters(SuitKeyValue): suit_parameter_strict_order: SuitBool, suit_parameter_soft_failure: SuitBool, suit_parameter_image_size: SuitImageSize, - suit_parameter_content: SuitBstr, + suit_parameter_content: SuitParameterContent, suit_parameter_encryption_info: SuitEncryptionInfo, suit_parameter_uri: SuitTstr, suit_parameter_source_component: SuitUint,