mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-27 17:08:14 +00:00
feat(core): add allow unlimited run vendorheader flag
[no changelog]
This commit is contained in:
parent
f898dc1232
commit
3b9be7baec
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": true,
|
||||
"allow_run_with_secret": true,
|
||||
"show_vendor_string": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 1],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"allow_run_with_secret": false,
|
||||
"show_vendor_string": true,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 1],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": true,
|
||||
"deny_provisioning_access": true,
|
||||
"allow_run_with_secret": false,
|
||||
"show_vendor_string": true,
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": true,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": true,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": true,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": true,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": true,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
@ -7,6 +7,7 @@
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"_reserved": 0,
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"_dont_provide_secret": false,
|
||||
"allow_run_with_secret": false,
|
||||
|
Binary file not shown.
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": true,
|
||||
"allow_run_with_secret": true,
|
||||
"show_vendor_string": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"allow_run_with_secret": true,
|
||||
"show_vendor_string": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": false,
|
||||
"allow_run_with_secret": true,
|
||||
"show_vendor_string": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": true,
|
||||
"allow_run_with_secret": true,
|
||||
"show_vendor_string": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": false,
|
||||
"deny_provisioning_access": true,
|
||||
"allow_run_with_secret": true,
|
||||
"show_vendor_string": false,
|
||||
|
@ -6,6 +6,7 @@
|
||||
"version": [0, 0],
|
||||
"sig_m": 2,
|
||||
"trust": {
|
||||
"limit_runtime": true,
|
||||
"deny_provisioning_access": true,
|
||||
"allow_run_with_secret": false,
|
||||
"show_vendor_string": true,
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -89,6 +89,7 @@ typedef struct {
|
||||
(VTRUST_WAIT_MASK | VTRUST_NO_RED | VTRUST_NO_CLICK | VTRUST_NO_STRING)
|
||||
|
||||
#define VTRUST_ALLOW_PROVISIONING 0x200
|
||||
#define VTRUST_ALLOW_UNLIMITED_RUN 0x400
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
|
@ -49,6 +49,7 @@ def _transform_vendor_trust(data: bytes) -> bytes:
|
||||
|
||||
|
||||
class VendorTrust(Struct):
|
||||
limit_runtime: bool
|
||||
deny_provisioning_access: bool
|
||||
_dont_provide_secret: bool
|
||||
allow_run_with_secret: bool
|
||||
@ -61,7 +62,8 @@ class VendorTrust(Struct):
|
||||
|
||||
SUBCON = c.Transformed(
|
||||
c.BitStruct(
|
||||
"_reserved" / c.Default(c.BitsInteger(6), 0b111111),
|
||||
"_reserved" / c.Default(c.BitsInteger(5), 0b11111),
|
||||
"limit_runtime" / c.Default(c.Flag, 1),
|
||||
"deny_provisioning_access" / c.Default(c.Flag, 1),
|
||||
"_dont_provide_secret"
|
||||
/ c.Default(c.Flag, lambda this: not this.allow_run_with_secret),
|
||||
|
Loading…
Reference in New Issue
Block a user