Skip to content

Commit

Permalink
Fix example compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Nov 8, 2023
1 parent 43bcd3e commit 4ec1454
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/usbip/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ use clap_num::maybe_hex;
use trussed::backend::BackendId;
use trussed::platform::{consent, reboot, ui};

use trussed::service::ClientFilestore;
use trussed::types::Location;
use trussed::virt::{Filesystem, StoreProvider};
use trussed::{virt, ClientImplementation, Platform};
use trussed_usbip::ClientBuilder;

Expand Down Expand Up @@ -393,7 +395,7 @@ type FidoAuthApp = fido_authenticator::Authenticator<fido_authenticator::Conform
type WebcryptApp = webcrypt::Webcrypt<VirtClient>;

struct Apps {
admin: admin_app::App<VirtClient, Reboot, AdminStatus>,
admin: admin_app::App<VirtClient, Reboot, AdminStatus, ()>,
peeking_fido: PeekingBypass<'static, FidoAuthApp, WebcryptApp>,
}

Expand All @@ -411,15 +413,16 @@ impl trussed_usbip::Apps<'static, VirtClient, dispatch::Dispatch> for Apps {
max_resident_credential_count: Some(MAX_RESIDENT_CREDENTIAL_COUNT),
},
);
let mut filestore = ClientFilestore::new("admin".into(), unsafe { Filesystem::store() });
let data = AdminData::new(Variant::Usbip);
let admin = admin_app::App::new(
let admin = admin_app::App::load(
builder.build("admin", &[BackendId::Core]),
&mut filestore,
[0; 16],
0,
"",
data.encode(),
);

let webcrypt = webcrypt::Webcrypt::new_with_options(
builder.build("webcrypt", dispatch::BACKENDS),
Options::new(Location::External, *b"1234", 10000),
Expand Down

0 comments on commit 4ec1454

Please sign in to comment.