mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-22 04:22:07 +00:00
bootloader: fix signatures_ok usage in usb.c after refactoring
This commit is contained in:
parent
b20336e82d
commit
b933e292db
@ -444,7 +444,7 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep)
|
||||
}
|
||||
if (brand_new_firmware || button.YesUp) {
|
||||
// check whether current firmware is signed
|
||||
if (signatures_ok(NULL)) {
|
||||
if (SIG_OK == signatures_ok(NULL)) {
|
||||
old_was_unsigned = false;
|
||||
// backup metadata
|
||||
backup_metadata(meta_backup);
|
||||
@ -603,7 +603,7 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep)
|
||||
// 1) old firmware was unsigned
|
||||
// 2) firmware restore flag isn't set
|
||||
// 3) signatures are not ok
|
||||
if (old_was_unsigned || (flags & 0x01) == 0 || !signatures_ok(NULL)) {
|
||||
if (old_was_unsigned || (flags & 0x01) == 0 || SIG_OK != signatures_ok(NULL)) {
|
||||
memzero(meta_backup, sizeof(meta_backup));
|
||||
}
|
||||
// copy new firmware header
|
||||
|
Loading…
Reference in New Issue
Block a user