Skip to content

Commit

Permalink
feat(core): Add optiga_sec field to Features
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
andrewkozlik committed Jun 25, 2024
1 parent ca4bfa2 commit 4ee81da
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 122 deletions.
1 change: 1 addition & 0 deletions common/protob/messages-management.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ message Features {
optional uint32 unit_packaging = 51; // unit/device packaging version
optional bool haptic_feedback = 52; // haptic feedback is enabled
optional RecoveryType recovery_type = 53; // what type of recovery we are in. NB: this works in conjunction with recovery_status
optional uint32 optiga_sec = 54; // Optiga's security event counter.

enum BackupAvailability {
/// Device is already backed up, or a previous backup has failed.
Expand Down
5 changes: 5 additions & 0 deletions core/src/apps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ def get_features() -> Features:
else:
f.sd_card_present = False

if utils.USE_OPTIGA:
from trezor.crypto import optiga

f.optiga_sec = optiga.get_sec()

f.initialized = storage_device.is_initialized()

# private fields:
Expand Down
2 changes: 2 additions & 0 deletions core/src/trezor/messages.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions python/src/trezorlib/messages.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ee81da

Please sign in to comment.