Lines Matching refs:tlv
100 tlv = ImageTLV()
101 (tlv.it_type, _, tlv.it_len) = struct.unpack('<BBH', in_file.read(4))
102 (tlv.it_value) = struct.unpack('<{:d}s'.format(tlv.it_len), in_file.read(tlv.it_len))
103 return tlv
127 def damage_tlv(image_offset, tlv_off, tlv, out_file_content): argument
130 value = bytearray(tlv.it_value[0])
135 def is_valid_signature(tlv): argument
136 return tlv.it_type == TLV_VALUES['RSA2048'] or tlv.it_type == TLV_VALUES['RSA3072']
176 tlv = ImageTLV.read_from_binary(in_file)
178 …lv {:24s} len = {:4d}, len = {:4d}".format(get_tlv_type_string(tlv.it_type), tlv.it_len, len(tlv)))
180 if is_valid_signature(tlv) and args.signature:
181 damage_tlv(image_offset, tlv_off, tlv, out_file_content)
182 elif tlv.it_type == TLV_VALUES['SHA256'] and args.image_hash:
183 damage_tlv(image_offset, tlv_off, tlv, out_file_content)
185 tlv_off += len(tlv)