Skip to content

Commit

Permalink
Add support for listing configs
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Oct 3, 2024
1 parent 553fff1 commit 169f491
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ version = "1.7.2"
memory-regions = { path = "components/memory-regions" }

# forked
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", tag = "v0.1.0-nitrokey.13" }
cbor-smol = { git = "https://github.com/Nitrokey/cbor-smol.git", tag = "v0.4.0-nitrokey.4"}
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", rev = "e4d636f84cd7184b5c3af6e65357b122dda7f97c" }
cbor-smol = { git = "https://github.com/trussed-dev/cbor-smol.git", rev = "c0e68c70d144ab815440f859cbd633239d5d9e80" }
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", tag = "v0.1.1-nitrokey.19" }
lpc55-hal = { git = "https://github.com/Nitrokey/lpc55-hal", tag = "v0.3.0-nitrokey.2" }
trussed = { git = "https://github.com/nitrokey/trussed.git", tag = "v0.1.0-nitrokey.21" }
Expand Down
19 changes: 19 additions & 0 deletions components/apps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use heapless::Vec;
#[cfg(any(feature = "factory-reset", feature = "se050"))]
use littlefs2::path;

use admin_app::ConfigField;
#[cfg(feature = "factory-reset")]
use admin_app::ResetConfigResult;

Expand Down Expand Up @@ -82,6 +83,24 @@ impl admin_app::Config for Config {
}
}

fn list_available_config(&self) -> &'static [ConfigField] {
&[
ConfigField {
name: "fido.disable_skip_up_timeout",
requires_touch: false,
requires_reboot: false,
destructive: false,
},
#[cfg(feature = "se050")]
ConfigField {
name: "opcard.use_se050_backend",
requires_touch: true,
requires_reboot: true,
destructive: true,
},
]
}

fn reset_client_id(
&self,
key: &str,
Expand Down

0 comments on commit 169f491

Please sign in to comment.