mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
feat(legacy): report EMULATOR vendor in legacy
This commit is contained in:
parent
c9b521a8b0
commit
540d3ebaab
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
bool get_features(Features *resp) {
|
bool get_features(Features *resp) {
|
||||||
resp->has_fw_vendor = true;
|
resp->has_fw_vendor = true;
|
||||||
|
#if EMULATOR
|
||||||
|
strlcpy(resp->fw_vendor, "EMULATOR", sizeof(resp->fw_vendor));
|
||||||
|
#else
|
||||||
const image_header *hdr =
|
const image_header *hdr =
|
||||||
(const image_header *)FLASH_PTR(FLASH_FWHEADER_START);
|
(const image_header *)FLASH_PTR(FLASH_FWHEADER_START);
|
||||||
if (SIG_OK == signatures_new_ok(hdr, NULL)) {
|
if (SIG_OK == signatures_new_ok(hdr, NULL)) {
|
||||||
@ -26,6 +29,7 @@ bool get_features(Features *resp) {
|
|||||||
} else {
|
} else {
|
||||||
strlcpy(resp->fw_vendor, "UNSAFE, DO NOT USE!", sizeof(resp->fw_vendor));
|
strlcpy(resp->fw_vendor, "UNSAFE, DO NOT USE!", sizeof(resp->fw_vendor));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
resp->has_vendor = true;
|
resp->has_vendor = true;
|
||||||
strlcpy(resp->vendor, "trezor.io", sizeof(resp->vendor));
|
strlcpy(resp->vendor, "trezor.io", sizeof(resp->vendor));
|
||||||
resp->major_version = VERSION_MAJOR;
|
resp->major_version = VERSION_MAJOR;
|
||||||
|
Loading…
Reference in New Issue
Block a user