mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
tools: fix binctl script
This commit is contained in:
parent
0d7f486733
commit
c0220192d4
@ -182,7 +182,7 @@ void ui_screen_install_confirm_upgrade(const vendor_header * const vhdr, const i
|
||||
void ui_screen_install_confirm_newvendor(const vendor_header * const vhdr, const image_header * const hdr)
|
||||
{
|
||||
display_bar(0, 0, DISPLAY_RESX, DISPLAY_RESY, COLOR_WHITE);
|
||||
display_text(16, 32, "Re-install firmware", -1, FONT_NORMAL, COLOR_BLACK, COLOR_WHITE, 0);
|
||||
display_text(16, 32, "Vendor change", -1, FONT_NORMAL, COLOR_BLACK, COLOR_WHITE, 0);
|
||||
display_bar(16, 44, DISPLAY_RESX - 14 * 2, 1, COLOR_BLACK);
|
||||
display_icon(16, 54, 32, 32, toi_icon_info + 12, sizeof(toi_icon_info) - 12, COLOR_BLACK, COLOR_WHITE);
|
||||
display_text(55, 70, "Install firmware by", -1, FONT_NORMAL, COLOR_BLACK, COLOR_WHITE, 0);
|
||||
|
@ -232,11 +232,8 @@ class VendorHeader(object):
|
||||
return header
|
||||
|
||||
def sign(self, sigmask, signature):
|
||||
if sigmask >= (1 << self.vsig_n):
|
||||
raise Exception('signature index is higher than vsig_n (%d)' % self.vsig_n)
|
||||
if bin(sigmask).count('1') != self.vsig_m:
|
||||
raise Exception('invalid number of indexes (vsig_m expected %d, got %d)' % (self.vsig_m, bin(sigmask).count('1')))
|
||||
# sign
|
||||
header = self.serialize_header(sig=False)
|
||||
assert len(header) == self.hdrlen
|
||||
self.sigmask = sigmask
|
||||
self.sig = signature
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user