Commit 3eb50263 authored by Almir Okato's avatar Almir Okato Committed by Gustavo Henrique Nihei
Browse files

imgtool: Fix imgtool sign command without key

The fix adds a condition that checks if either key or fixed_sig are
`not None` before payload signing and TLV addition.

Signed-off-by: default avatarAlmir Okato <almir.okato@espressif.com>
parent e802cd48
Loading
Loading
Loading
Loading
+1 −0
Changes for scripts/imgtool/image.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -435,6 +435,7 @@ class Image():

        tlv.add('SHA256', digest)

        if key is not None or fixed_sig is not None:
            if public_key_format == 'hash':
                tlv.add('KEYHASH', pubbytes)
            else: