Lines Matching +full:check +full:- +full:signed +full:- +full:off +full:- +full:by
2 # Copyright 2017-2020 Linaro Limited
3 # Copyright 2019-2024 Arm Limited
5 # SPDX-License-Identifier: Apache-2.0
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
118 assert (align & (align - 1) == 0) and align != 0
119 return (num + (align - 1)) & ~(align - 1)
218 raise click.UsageError("Key {} can not be used with --sha {}; allowed sha are one of {}"
230 """Check if provided key matches to TLV record in the image"""
344 self.base_addr -= self.header_size
359 self.base_addr -= self.header_size
372 "neither was it provided by user")
383 trailer_addr = (self.base_addr + self.slot_size) - trailer_size
387 image_ok_idx = -(magic_align_size + self.max_align)
392 h.puts(trailer_addr + (trailer_size - len(self.boot_magic)),
412 padding = self.slot_size - (len(self.payload) + tsize)
530 pad = bytes(16 - pad_len)
591 # so, for example, in case of ED25519 we have here SHAxxx-ED25519-SHA512.
601 # Just keep data vector which is expected to be signed
632 … raise click.UsageError("Can not sign using key and provide fixed-signature at the same time")
634 # At this point the image was hashed + signed, we can remove the
635 # protected TLVs from the payload (will be re-added later)
723 len(self.payload) - self.header_size, # ImageSz
735 # NOTE: should already be checked by the argument parser
748 # TLV saved by the bootloader is aligned
762 padding = size - (len(self.payload) + tsize)
764 pbytes += bytearray([self.erased_val] * (tsize - len(self.boot_magic)))
769 image_ok_idx = -(magic_align_size + self.max_align)
813 off = tlv_off + TLV_SIZE
815 if digest == b[off:off + tlv_len]:
821 off = tlv_off + TLV_SIZE
822 tlv_sig = b[off:off + tlv_len]