mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 07:50:57 +00:00
chore: drop obsolete fw_vendor_keys field from Features
[no changelog]
This commit is contained in:
parent
35d40cc164
commit
b0e0280465
@ -75,7 +75,7 @@ message Features {
|
||||
optional uint32 fw_minor = 23; // reported firmware version if in bootloader mode
|
||||
optional uint32 fw_patch = 24; // reported firmware version if in bootloader mode
|
||||
optional string fw_vendor = 25; // reported firmware vendor if in bootloader mode
|
||||
optional bytes fw_vendor_keys = 26; // reported firmware vendor keys (their hash)
|
||||
// optional bytes fw_vendor_keys = 26; // obsoleted, use fw_vendor
|
||||
optional bool unfinished_backup = 27; // report unfinished backup (equals to Storage.unfinished_backup)
|
||||
optional bool no_backup = 28; // report no backup (equals to Storage.no_backup)
|
||||
optional bool recovery_mode = 29; // is recovery mode in progress
|
||||
|
@ -294,9 +294,6 @@ static void send_msg_features(uint8_t iface_num,
|
||||
MSG_SEND_ASSIGN_VALUE(fw_minor, ((hdr->version >> 8) & 0xFF));
|
||||
MSG_SEND_ASSIGN_VALUE(fw_patch, ((hdr->version >> 16) & 0xFF));
|
||||
MSG_SEND_ASSIGN_STRING_LEN(fw_vendor, vhdr->vstr, vhdr->vstr_len);
|
||||
uint8_t hash[32];
|
||||
vendor_header_hash(vhdr, hash);
|
||||
MSG_SEND_ASSIGN_BYTES(fw_vendor_keys, hash, 32);
|
||||
} else {
|
||||
MSG_SEND_ASSIGN_VALUE(firmware_present, false);
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ Features.label max_size:33
|
||||
Features.revision max_size:20
|
||||
Features.model max_size:17
|
||||
Features.fw_vendor max_size:256
|
||||
Features.fw_vendor_keys max_size:32
|
||||
|
||||
Ping.message max_size:256
|
||||
|
||||
|
@ -61,7 +61,6 @@ typedef struct _Failure {
|
||||
} Failure;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(20) Features_revision_t;
|
||||
typedef PB_BYTES_ARRAY_T(32) Features_fw_vendor_keys_t;
|
||||
typedef struct _Features {
|
||||
bool has_vendor;
|
||||
char vendor[33];
|
||||
@ -92,8 +91,6 @@ typedef struct _Features {
|
||||
uint32_t fw_patch;
|
||||
bool has_fw_vendor;
|
||||
char fw_vendor[256];
|
||||
bool has_fw_vendor_keys;
|
||||
Features_fw_vendor_keys_t fw_vendor_keys;
|
||||
} Features;
|
||||
|
||||
typedef struct _FirmwareErase {
|
||||
@ -147,7 +144,7 @@ extern "C" {
|
||||
/* Initializer values for message structs */
|
||||
#define Initialize_init_default {0}
|
||||
#define GetFeatures_init_default {0}
|
||||
#define Features_init_default {false, "", 0, 0, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, "", false, 0, false, 0, false, 0, false, "", false, {0, {0}}}
|
||||
#define Features_init_default {false, "", 0, 0, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, "", false, 0, false, 0, false, 0, false, ""}
|
||||
#define Ping_init_default {false, ""}
|
||||
#define Success_init_default {false, ""}
|
||||
#define Failure_init_default {false, _FailureType_MIN, false, ""}
|
||||
@ -158,7 +155,7 @@ extern "C" {
|
||||
#define FirmwareUpload_init_default {{{NULL}, NULL}, false, {0, {0}}}
|
||||
#define Initialize_init_zero {0}
|
||||
#define GetFeatures_init_zero {0}
|
||||
#define Features_init_zero {false, "", 0, 0, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, "", false, 0, false, 0, false, 0, false, "", false, {0, {0}}}
|
||||
#define Features_init_zero {false, "", 0, 0, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, "", false, 0, false, 0, false, 0, false, ""}
|
||||
#define Ping_init_zero {false, ""}
|
||||
#define Success_init_zero {false, ""}
|
||||
#define Failure_init_zero {false, _FailureType_MIN, false, ""}
|
||||
@ -188,7 +185,6 @@ extern "C" {
|
||||
#define Features_fw_minor_tag 23
|
||||
#define Features_fw_patch_tag 24
|
||||
#define Features_fw_vendor_tag 25
|
||||
#define Features_fw_vendor_keys_tag 26
|
||||
#define FirmwareErase_length_tag 1
|
||||
#define FirmwareRequest_offset_tag 1
|
||||
#define FirmwareRequest_length_tag 2
|
||||
@ -224,8 +220,7 @@ X(a, STATIC, OPTIONAL, STRING, model, 21) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, fw_major, 22) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, fw_minor, 23) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, fw_patch, 24) \
|
||||
X(a, STATIC, OPTIONAL, STRING, fw_vendor, 25) \
|
||||
X(a, STATIC, OPTIONAL, BYTES, fw_vendor_keys, 26)
|
||||
X(a, STATIC, OPTIONAL, STRING, fw_vendor, 25)
|
||||
#define Features_CALLBACK NULL
|
||||
#define Features_DEFAULT NULL
|
||||
|
||||
@ -302,7 +297,7 @@ extern const pb_msgdesc_t FirmwareUpload_msg;
|
||||
#define ButtonAck_size 0
|
||||
#define ButtonRequest_size 2
|
||||
#define Failure_size 260
|
||||
#define Features_size 493
|
||||
#define Features_size 458
|
||||
#define FirmwareErase_size 6
|
||||
#define FirmwareRequest_size 12
|
||||
#define GetFeatures_size 0
|
||||
|
@ -55,7 +55,7 @@ message Features {
|
||||
optional uint32 fw_minor = 23; // reported firmware version if in bootloader mode
|
||||
optional uint32 fw_patch = 24; // reported firmware version if in bootloader mode
|
||||
optional string fw_vendor = 25; // reported firmware vendor if in bootloader mode
|
||||
optional bytes fw_vendor_keys = 26; // reported firmware vendor keys (their hash)
|
||||
// optional bytes fw_vendor_keys = 26; // obsoleted, use fw_vendor
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -294,9 +294,6 @@ static void send_msg_features(uint8_t iface_num,
|
||||
MSG_SEND_ASSIGN_VALUE(fw_minor, ((hdr->version >> 8) & 0xFF));
|
||||
MSG_SEND_ASSIGN_VALUE(fw_patch, ((hdr->version >> 16) & 0xFF));
|
||||
MSG_SEND_ASSIGN_STRING_LEN(fw_vendor, vhdr->vstr, vhdr->vstr_len);
|
||||
uint8_t hash[32];
|
||||
vendor_header_hash(vhdr, hash);
|
||||
MSG_SEND_ASSIGN_BYTES(fw_vendor_keys, hash, 32);
|
||||
} else {
|
||||
MSG_SEND_ASSIGN_VALUE(firmware_present, false);
|
||||
}
|
||||
|
@ -1839,7 +1839,6 @@ if TYPE_CHECKING:
|
||||
fw_minor: "int | None"
|
||||
fw_patch: "int | None"
|
||||
fw_vendor: "str | None"
|
||||
fw_vendor_keys: "bytes | None"
|
||||
unfinished_backup: "bool | None"
|
||||
no_backup: "bool | None"
|
||||
recovery_mode: "bool | None"
|
||||
@ -1882,7 +1881,6 @@ if TYPE_CHECKING:
|
||||
fw_minor: "int | None" = None,
|
||||
fw_patch: "int | None" = None,
|
||||
fw_vendor: "str | None" = None,
|
||||
fw_vendor_keys: "bytes | None" = None,
|
||||
unfinished_backup: "bool | None" = None,
|
||||
no_backup: "bool | None" = None,
|
||||
recovery_mode: "bool | None" = None,
|
||||
|
@ -8,7 +8,6 @@ Features.revision max_size:20
|
||||
Features.bootloader_hash max_size:32
|
||||
Features.model max_size:17
|
||||
Features.fw_vendor max_size:256
|
||||
Features.fw_vendor_keys max_size:32
|
||||
Features.capabilities max_count:32
|
||||
Features.session_id max_size:32
|
||||
|
||||
|
@ -3055,7 +3055,6 @@ class Features(protobuf.MessageType):
|
||||
23: protobuf.Field("fw_minor", "uint32", repeated=False, required=False),
|
||||
24: protobuf.Field("fw_patch", "uint32", repeated=False, required=False),
|
||||
25: protobuf.Field("fw_vendor", "string", repeated=False, required=False),
|
||||
26: protobuf.Field("fw_vendor_keys", "bytes", repeated=False, required=False),
|
||||
27: protobuf.Field("unfinished_backup", "bool", repeated=False, required=False),
|
||||
28: protobuf.Field("no_backup", "bool", repeated=False, required=False),
|
||||
29: protobuf.Field("recovery_mode", "bool", repeated=False, required=False),
|
||||
@ -3100,7 +3099,6 @@ class Features(protobuf.MessageType):
|
||||
fw_minor: Optional["int"] = None,
|
||||
fw_patch: Optional["int"] = None,
|
||||
fw_vendor: Optional["str"] = None,
|
||||
fw_vendor_keys: Optional["bytes"] = None,
|
||||
unfinished_backup: Optional["bool"] = None,
|
||||
no_backup: Optional["bool"] = None,
|
||||
recovery_mode: Optional["bool"] = None,
|
||||
@ -3140,7 +3138,6 @@ class Features(protobuf.MessageType):
|
||||
self.fw_minor = fw_minor
|
||||
self.fw_patch = fw_patch
|
||||
self.fw_vendor = fw_vendor
|
||||
self.fw_vendor_keys = fw_vendor_keys
|
||||
self.unfinished_backup = unfinished_backup
|
||||
self.no_backup = no_backup
|
||||
self.recovery_mode = recovery_mode
|
||||
|
Loading…
Reference in New Issue
Block a user