From df2ff384bea40c02f702c04cb5227255beeea15e Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Thu, 25 Nov 2021 00:26:57 +0100 Subject: [PATCH] Extract admin-app --- components/admin-app/Cargo.toml | 13 -- components/admin-app/src/admin.rs | 185 ------------------- components/admin-app/src/lib.rs | 10 - components/ctaphid-dispatch/Cargo.toml | 24 --- components/ctaphid-dispatch/src/app.rs | 18 -- components/ctaphid-dispatch/src/command.rs | 159 ---------------- components/ctaphid-dispatch/src/constants.rs | 5 - components/ctaphid-dispatch/src/dispatch.rs | 89 --------- components/ctaphid-dispatch/src/lib.rs | 19 -- components/ctaphid-dispatch/src/types.rs | 24 --- components/dispatch-fido/Cargo.toml | 13 +- components/ndef-app/Cargo.toml | 4 +- components/nfc-device/Cargo.toml | 4 +- components/provisioner-app/Cargo.toml | 4 +- components/usbd-ccid/Cargo.toml | 2 +- components/usbd-ctaphid/Cargo.toml | 10 +- runners/lpc55/Cargo.toml | 16 +- runners/lpc55/board/Cargo.toml | 2 +- runners/pc/Cargo.toml | 14 +- 19 files changed, 31 insertions(+), 584 deletions(-) delete mode 100644 components/admin-app/Cargo.toml delete mode 100644 components/admin-app/src/admin.rs delete mode 100644 components/admin-app/src/lib.rs delete mode 100644 components/ctaphid-dispatch/Cargo.toml delete mode 100644 components/ctaphid-dispatch/src/app.rs delete mode 100644 components/ctaphid-dispatch/src/command.rs delete mode 100644 components/ctaphid-dispatch/src/constants.rs delete mode 100644 components/ctaphid-dispatch/src/dispatch.rs delete mode 100644 components/ctaphid-dispatch/src/lib.rs delete mode 100644 components/ctaphid-dispatch/src/types.rs diff --git a/components/admin-app/Cargo.toml b/components/admin-app/Cargo.toml deleted file mode 100644 index c19a2ae4..00000000 --- a/components/admin-app/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "admin-app" -version = "0.1.0" -authors = ["Conor Patrick "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main" } -iso7816 = { git = "https://github.com/ycrypto/iso7816", branch = "main" } -ctaphid-dispatch = {path = "../ctaphid-dispatch"} -trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main" } diff --git a/components/admin-app/src/admin.rs b/components/admin-app/src/admin.rs deleted file mode 100644 index 0d69e7a1..00000000 --- a/components/admin-app/src/admin.rs +++ /dev/null @@ -1,185 +0,0 @@ -use core::{convert::TryInto, marker::PhantomData}; -use ctaphid_dispatch::app::{self as hid, Command as HidCommand, Message}; -use ctaphid_dispatch::command::VendorCommand; -use apdu_dispatch::{Command, command, response, app as apdu}; -use apdu_dispatch::iso7816::Status; -use trussed::{ - syscall, - Client as TrussedClient, -}; - -const UPDATE: VendorCommand = VendorCommand::H51; -const REBOOT: VendorCommand = VendorCommand::H53; -const RNG: VendorCommand = VendorCommand::H60; -const VERSION: VendorCommand = VendorCommand::H61; -const UUID: VendorCommand = VendorCommand::H62; - -pub trait Reboot { - /// Reboots the device. - fn reboot() -> !; - - /// Reboots the device. - /// - /// Presuming the device has a separate mode of operation that - /// allows updating its firmware (for instance, a bootloader), - /// reboots the device into this mode. - fn reboot_to_firmware_update() -> !; - - /// Reboots the device. - /// - /// Presuming the device has a separate destructive but more - /// reliable way of rebooting into the firmware mode of operation, - /// does so. - fn reboot_to_firmware_update_destructive() -> !; -} - -pub struct App -where T: TrussedClient, - R: Reboot, -{ - got_wink: bool, - trussed: T, - uuid: [u8; 16], - version: u32, - boot_interface: PhantomData, -} - -impl App -where T: TrussedClient, - R: Reboot, -{ - pub fn new(client: T, uuid: [u8; 16], version: u32) -> Self { - Self { got_wink: false, trussed: client, uuid, version, boot_interface: PhantomData } - } - - /// Indicate if a wink was recieved - pub fn wink(&mut self) -> bool { - if self.got_wink { - self.got_wink = false; - true - } else { - false - } - } - - fn user_present(&mut self) -> bool { - let user_present = syscall!(self.trussed.confirm_user_present(15_000)).result; - user_present.is_ok() - } - - -} - -impl hid::App for App -where T: TrussedClient, - R: Reboot -{ - fn commands(&self) -> &'static [HidCommand] { - &[ - HidCommand::Wink, - HidCommand::Vendor(UPDATE), - HidCommand::Vendor(REBOOT), - HidCommand::Vendor(RNG), - HidCommand::Vendor(VERSION), - HidCommand::Vendor(UUID), - ] - } - - fn call(&mut self, command: HidCommand, input_data: &Message, response: &mut Message) -> hid::AppResult { - match command { - HidCommand::Vendor(REBOOT) => R::reboot(), - HidCommand::Vendor(RNG) => { - // Fill the HID packet (57 bytes) - response.extend_from_slice( - &syscall!(self.trussed.random_bytes(57)).bytes.as_slice() - ).ok(); - } - HidCommand::Vendor(UPDATE) => { - if self.user_present() { - if input_data.len() > 0 && input_data[0] == 0x01 { - R::reboot_to_firmware_update_destructive(); - } else { - R::reboot_to_firmware_update(); - } - } else { - return Err(hid::Error::InvalidLength); - } - } - HidCommand::Vendor(UUID) => { - // Get UUID - response.extend_from_slice(&self.uuid).ok(); - } - HidCommand::Vendor(VERSION) => { - // GET VERSION - response.extend_from_slice(&self.version.to_be_bytes()).ok(); - } - HidCommand::Wink => self.got_wink = true, - _ => { - return Err(hid::Error::InvalidCommand); - } - } - Ok(()) - } -} - -impl iso7816::App for App -where T: TrussedClient, - R: Reboot -{ - // Solo management app - fn aid(&self) -> iso7816::Aid { - iso7816::Aid::new(&[ 0xA0, 0x00, 0x00, 0x08, 0x47, 0x00, 0x00, 0x00, 0x01]) - } -} - -impl apdu::App<{command::SIZE}, {response::SIZE}> for App -where T: TrussedClient, - R: Reboot -{ - - fn select(&mut self, _apdu: &Command, _reply: &mut response::Data) -> apdu::Result { - Ok(()) - } - - fn deselect(&mut self) {} - - fn call(&mut self, interface: apdu::Interface, apdu: &Command, reply: &mut response::Data) -> apdu::Result { - let instruction: u8 = apdu.instruction().into(); - - let command: VendorCommand = instruction.try_into().map_err(|_e| Status::InstructionNotSupportedOrInvalid)?; - - match command { - REBOOT => R::reboot(), - RNG => { - // Random bytes - reply.extend_from_slice(&syscall!(self.trussed.random_bytes(57)).bytes.as_slice()).ok(); - } - UPDATE => { - // Boot to mcuboot (only when contact interface) - if interface == apdu::Interface::Contact && self.user_present() - { - if apdu.p1 == 0x01 { - R::reboot_to_firmware_update_destructive(); - } else { - R::reboot_to_firmware_update(); - } - } - return Err(Status::ConditionsOfUseNotSatisfied); - } - UUID => { - // Get UUID - reply.extend_from_slice(&self.uuid).ok(); - } - VERSION => { - // Get version - reply.extend_from_slice(&self.version.to_be_bytes()[..]).ok(); - } - - _ => return Err(Status::InstructionNotSupportedOrInvalid), - - } - Ok(()) - - } -} - diff --git a/components/admin-app/src/lib.rs b/components/admin-app/src/lib.rs deleted file mode 100644 index b4e63c19..00000000 --- a/components/admin-app/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -//! # management-app -//! -//! A simple application that implements management operations, -//! such as firmware upgrade. -//! -//! It directly implements the APDU and CTAPHID dispatch App interfaces. -#![no_std] - -mod admin; -pub use admin::{App, Reboot}; diff --git a/components/ctaphid-dispatch/Cargo.toml b/components/ctaphid-dispatch/Cargo.toml deleted file mode 100644 index a26a1af6..00000000 --- a/components/ctaphid-dispatch/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "ctaphid-dispatch" -version = "0.0.1" -authors = ["Conor Patrick ", "Nicolas Stalder "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -delog = "0.1.0" -heapless = "0.7" -heapless-bytes = "0.3" -interchange = "0.2.0" - -[features] -default = [] -std = ["delog/std"] - -log-all = [] -log-none = [] -log-info = [] -log-debug = [] -log-warn = [] -log-error = [] diff --git a/components/ctaphid-dispatch/src/app.rs b/components/ctaphid-dispatch/src/app.rs deleted file mode 100644 index dfa5f203..00000000 --- a/components/ctaphid-dispatch/src/app.rs +++ /dev/null @@ -1,18 +0,0 @@ - -pub use crate::types::{AppResult, Error, Message}; -pub use crate::command::Command; - -/// trait interface for a CTAPHID application. -/// The application chooses which commands to register to, and will be called upon -/// when the commands are received in the CTAPHID layer. Only one application can be registered to a particular command. -pub trait App { - - /// Define which CTAPHID commands to register to. - fn commands(&self) -> &'static [Command]; - - /// Application is called here when one of it's register commands occurs. - /// Application must put response in @message, or decide to return an error. - /// - /// The response is pre-cleared. - fn call(&mut self, command: Command, request: &Message, response: &mut Message) -> AppResult; -} diff --git a/components/ctaphid-dispatch/src/command.rs b/components/ctaphid-dispatch/src/command.rs deleted file mode 100644 index 95ad87ae..00000000 --- a/components/ctaphid-dispatch/src/command.rs +++ /dev/null @@ -1,159 +0,0 @@ -use core::convert::TryFrom; - -#[derive(Copy,Clone,Debug,Eq,PartialEq)] -pub enum Command { - // mandatory for CTAP1 - Ping, - Msg, - Init, - Error, - - // optional - Wink, - Lock, - - // mandatory for CTAP2 - Cbor, - Cancel, - KeepAlive, - - // ISO7816 only commands - Deselect, - - // vendor-assigned range from 0x40 to 0x7f - Vendor(VendorCommand), -} - -impl Command { - pub fn into_u8(self) -> u8 { - self.into() - } -} - -impl TryFrom for Command { - type Error = (); - - fn try_from(from: u8) -> core::result::Result { - match from { - 0x01 => Ok(Command::Ping), - 0x03 => Ok(Command::Msg), - 0x06 => Ok(Command::Init), - 0x3f => Ok(Command::Error), - 0x08 => Ok(Command::Wink), - 0x04 => Ok(Command::Lock), - 0x10 => Ok(Command::Cbor), - 0x11 => Ok(Command::Cancel), - 0x12 => Ok(Command::Deselect), - 0x3b => Ok(Command::KeepAlive), - code => Ok(Command::Vendor(VendorCommand::try_from(code)?)), - } - } -} - -/// Vendor CTAPHID commands, from 0x40 to 0x7f. -#[repr(u8)] -#[derive(Copy,Clone,Debug,Eq,PartialEq)] -pub enum VendorCommand { - H40 = 0x40, - H41 = 0x41, - H42 = 0x42, - H43 = 0x43, - H44 = 0x44, - H45 = 0x45, - H46 = 0x46, - H47 = 0x47, - H48 = 0x48, - H49 = 0x49, - H4A = 0x4A, - H4B = 0x4B, - H4C = 0x4C, - H4D = 0x4D, - H4E = 0x4E, - H4F = 0x4F, - H50 = 0x50, - H51 = 0x51, - H52 = 0x52, - H53 = 0x53, - H54 = 0x54, - H55 = 0x55, - H56 = 0x56, - H57 = 0x57, - H58 = 0x58, - H59 = 0x59, - H5A = 0x5A, - H5B = 0x5B, - H5C = 0x5C, - H5D = 0x5D, - H5E = 0x5E, - H5F = 0x5F, - H60 = 0x60, - H61 = 0x61, - H62 = 0x62, - H63 = 0x63, - H64 = 0x64, - H65 = 0x65, - H66 = 0x66, - H67 = 0x67, - H68 = 0x68, - H69 = 0x69, - H6A = 0x6A, - H6B = 0x6B, - H6C = 0x6C, - H6D = 0x6D, - H6E = 0x6E, - H6F = 0x6F, - H70 = 0x70, - H71 = 0x71, - H72 = 0x72, - H73 = 0x73, - H74 = 0x74, - H75 = 0x75, - H76 = 0x76, - H77 = 0x77, - H78 = 0x78, - H79 = 0x79, - H7A = 0x7A, - H7B = 0x7B, - H7C = 0x7C, - H7D = 0x7D, - H7E = 0x7E, - H7F = 0x7F, -} - -impl VendorCommand { - pub const FIRST: u8 = 0x40; - pub const LAST: u8 = 0x7f; -} - - -impl TryFrom for VendorCommand { - type Error = (); - - fn try_from(from: u8) -> core::result::Result { - match from { - // code if code >= Self::FIRST && code <= Self::LAST => Ok(VendorCommand(code)), - code @ Self::FIRST..=Self::LAST => Ok(unsafe { core::mem::transmute(code) }), - // TODO: replace with Command::Unknown and infallible Try - _ => Err(()), - } - } -} - -impl Into for Command { - fn into(self) -> u8 { - match self { - Command::Ping => 0x01, - Command::Msg => 0x03, - Command::Init => 0x06, - Command::Error => 0x3f, - Command::Wink => 0x08, - Command::Lock => 0x04, - Command::Cbor => 0x10, - Command::Cancel => 0x11, - Command::Deselect => 0x12, - Command::KeepAlive => 0x3b, - Command::Vendor(command) => command as u8, - } - } -} - diff --git a/components/ctaphid-dispatch/src/constants.rs b/components/ctaphid-dispatch/src/constants.rs deleted file mode 100644 index 4c864d79..00000000 --- a/components/ctaphid-dispatch/src/constants.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub const PACKET_SIZE: usize = 64; - -// 7609 bytes -pub const MESSAGE_SIZE: usize = PACKET_SIZE - 7 + 128 * (PACKET_SIZE - 5); - diff --git a/components/ctaphid-dispatch/src/dispatch.rs b/components/ctaphid-dispatch/src/dispatch.rs deleted file mode 100644 index 061343d1..00000000 --- a/components/ctaphid-dispatch/src/dispatch.rs +++ /dev/null @@ -1,89 +0,0 @@ - -use interchange::{Interchange, Responder}; -use crate::types::{Command, Message, HidInterchange, Error}; -use crate::app::App; - -pub struct Dispatch { - responder: Responder, -} - - -impl Dispatch { - pub fn new( - responder: Responder, - ) -> Dispatch { - Dispatch { - responder, - } - } - - fn find_app<'a, 'b>( - command: Command, - apps: &'a mut [&'b mut dyn App] - ) -> Option<&'a mut &'b mut dyn App> { - - apps.iter_mut().find(|app| - app.commands().contains(&command) - ) - } - - // // Using helper here to take potentially large stack burden off of call chain to application. - // #[inline(never)] - // fn reply_with_request_buffer(&mut self){ - // let (_command, message) = self.responder.take_request().unwrap(); - // let message = message.clone(); - // self.responder.respond(&Ok(message)).expect("responder failed"); - // } - - // Using helper here to take potentially large stack burden off of call chain to application. - #[inline(never)] - fn reply_with_error(&mut self, error: Error){ - self.responder.respond( - &Err(error) - ).expect("cant respond"); - } - - #[inline(never)] - fn call_app(&mut self, app: &mut dyn App, command: Command, request: &Message) { - // now we do something that should be fixed conceptually later. - // We will no longer use the interchange data as request (just cloned it) - // We would like to pass the app a buffer to write data into - so we - // use the "big enough" request reference for this (it would make much more - // sense to use the response mut reference, but that's behind a Result). - // - // Note that this only works since Request has the same type as - // Response's Ok value. - let tuple: &mut (Command, Message) = unsafe { self.responder.interchange.rq_mut() }; - let response_buffer = &mut tuple.1; - response_buffer.clear(); - - if let Err(error) = app.call(command, &request, response_buffer) { - self.reply_with_error(error) - } else { - let response = Ok(response_buffer.clone()); - self.responder.respond(&response).expect("responder failed"); - } - } - - #[inline(never)] - pub fn poll<'a>( - &mut self, - apps: &mut [&'a mut dyn App], - ) -> bool { - let maybe_request = self.responder.take_request(); - if let Some((command, message)) = maybe_request { - info_now!("cmd: {}", u8::from(command)); - - if let Some(app) = Self::find_app(command, apps) { - // match app.call(command, self.responder.response_mut().unwrap()) { - let request = message.clone(); - self.call_app(*app, command, &request); - } else { - self.reply_with_error(Error::InvalidCommand); - } - } - - self.responder.state() == interchange::State::Responded - } - -} diff --git a/components/ctaphid-dispatch/src/lib.rs b/components/ctaphid-dispatch/src/lib.rs deleted file mode 100644 index d212bc8a..00000000 --- a/components/ctaphid-dispatch/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -//! # ctaphid-dispatch -//! -//! This library defines a concept of CTAPHID apps, which declare -//! CTAPHID commands, which are then dispatched to them. -//! -//! The intention is for non-FIDO authenticator apps to be able -//! to extend the CTAPHID interface with additional functionality. -//! -//! For instance, the Solo 2 management app. -#![cfg_attr(not(feature = "std"), no_std)] - -#[macro_use] -extern crate delog; -generate_macros!(); - -pub mod app; -pub mod types; -pub mod command; -pub mod dispatch; diff --git a/components/ctaphid-dispatch/src/types.rs b/components/ctaphid-dispatch/src/types.rs deleted file mode 100644 index 5e96e1c4..00000000 --- a/components/ctaphid-dispatch/src/types.rs +++ /dev/null @@ -1,24 +0,0 @@ - -#[derive(Copy,Clone,Debug,Eq,PartialEq)] -pub enum Error { - NoResponse, - InvalidCommand, - InvalidLength, -} - -// // 7609 bytes is max message size for ctaphid -// type U6144 = >::Output; -// type U7168 = >::Output; -// pub type U7609 = >::Output; -// pub type U7609 = heapless::consts::U4096; - -pub type Message = heapless::Vec; -pub type AppResult = core::result::Result<(), Error>; -pub type InterchangeResponse = core::result::Result; - -pub use crate::command::Command; - -interchange::interchange! { - HidInterchange: ((Command, crate::types::Message), crate::types::InterchangeResponse) -} - diff --git a/components/dispatch-fido/Cargo.toml b/components/dispatch-fido/Cargo.toml index d97fa75a..9e9ce6d4 100644 --- a/components/dispatch-fido/Cargo.toml +++ b/components/dispatch-fido/Cargo.toml @@ -13,13 +13,12 @@ heapless-bytes = "0.3" interchange = "0.2.0" serde = { version = "1", default-features = false } -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main" } -ctap-types = { git = "https://github.com/solokeys/ctap-types", branch = "main" } -fido-authenticator = { git = "https://github.com/solokeys/fido-authenticator", branch = "main" } -iso7816 = { git = "https://github.com/ycrypto/iso7816", branch = "main" } -trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main" } - -ctaphid-dispatch = {path = "../ctaphid-dispatch"} +apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch" } +ctaphid-dispatch = { git = "https://github.com/solokeys/ctaphid-dispatch" } +ctap-types = { git = "https://github.com/solokeys/ctap-types" } +fido-authenticator = { git = "https://github.com/solokeys/fido-authenticator" } +iso7816 = { git = "https://github.com/ycrypto/iso7816" } +trussed = { git = "https://github.com/trussed-dev/trussed" } [features] default = [] diff --git a/components/ndef-app/Cargo.toml b/components/ndef-app/Cargo.toml index 36736066..b47a7ad9 100644 --- a/components/ndef-app/Cargo.toml +++ b/components/ndef-app/Cargo.toml @@ -9,5 +9,5 @@ edition = "2018" [dependencies] heapless = "0.7" -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main" } -iso7816 = { git = "https://github.com/ycrypto/iso7816", branch = "main" } +apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch" } +iso7816 = { git = "https://github.com/ycrypto/iso7816" } diff --git a/components/nfc-device/Cargo.toml b/components/nfc-device/Cargo.toml index 4489a267..3de57a43 100644 --- a/components/nfc-device/Cargo.toml +++ b/components/nfc-device/Cargo.toml @@ -10,8 +10,8 @@ embedded-time = "0.12" heapless = "0.7" nb = "1" -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main" } -iso7816 = { git = "https://github.com/ycrypto/iso7816", branch = "main" } +apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch" } +iso7816 = { git = "https://github.com/ycrypto/iso7816" } interchange = "0.2.1" [features] diff --git a/components/provisioner-app/Cargo.toml b/components/provisioner-app/Cargo.toml index 796f09ad..59b23b5c 100644 --- a/components/provisioner-app/Cargo.toml +++ b/components/provisioner-app/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main" } +apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch" } delog = "0.1.1" heapless = "0.7" heapless-bytes = "0.3" lpc55-hal = { version = "0.3", features = ["littlefs", "rtic-peripherals"] } littlefs2 = "0.3.1" salty = { version = "0.2", features = ["cose"] } -trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main" } +trussed = { git = "https://github.com/trussed-dev/trussed" } [dependencies.nisty] version = "0.1.0-alpha.5" diff --git a/components/usbd-ccid/Cargo.toml b/components/usbd-ccid/Cargo.toml index fb23e43d..20be1dc4 100644 --- a/components/usbd-ccid/Cargo.toml +++ b/components/usbd-ccid/Cargo.toml @@ -12,7 +12,7 @@ embedded-time = "0.12" heapless = "0.7" # heapless-bytes = "0.3" interchange = "0.2.0" -iso7816 = { git = "https://github.com/ycrypto/iso7816", branch = "main" } +iso7816 = { git = "https://github.com/ycrypto/iso7816" } usb-device = { version = "0.2.3", features = ["control-buffer-256"] } [features] diff --git a/components/usbd-ctaphid/Cargo.toml b/components/usbd-ctaphid/Cargo.toml index f50ca051..a60bcca3 100644 --- a/components/usbd-ctaphid/Cargo.toml +++ b/components/usbd-ctaphid/Cargo.toml @@ -14,9 +14,8 @@ interchange = "0.2.0" serde = { version = "1.0", default-features = false } usb-device = "0.2.3" -ctap-types = { git = "https://github.com/solokeys/ctap-types", branch = "main" } - -ctaphid-dispatch = { path = "../ctaphid-dispatch" } +ctaphid-dispatch = { git = "https://github.com/solokeys/ctaphid-dispatch" } +ctap-types = { git = "https://github.com/solokeys/ctap-types" } [features] default = [] @@ -27,8 +26,3 @@ log-info = [] log-debug = [] log-warn = [] log-error = [] - - -[patch.crates-io] -heapless = { git = "https://github.com/nicolas-solokeys/heapless", branch = "bytebuf" } - diff --git a/runners/lpc55/Cargo.toml b/runners/lpc55/Cargo.toml index caf8f150..2b99e8e8 100644 --- a/runners/lpc55/Cargo.toml +++ b/runners/lpc55/Cargo.toml @@ -26,12 +26,14 @@ usb-device = "0.2.3" # usbd-hid = { version = "0.4.5", optional = true } usbd-serial = "0.1.0" -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main" } -ctap-types = { git = "https://github.com/solokeys/ctap-types", branch = "main" } -fido-authenticator = { git = "https://github.com/solokeys/fido-authenticator", branch = "main", optional = true } -oath-authenticator = { git = "https://github.com/trussed-dev/oath-authenticator", branch = "main", features = ["apdu-dispatch"], optional = true } -piv-authenticator = { git = "https://github.com/solokeys/piv-authenticator", branch = "main", features = ["apdu-dispatch"], optional = true } -trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main" } +admin-app = { git = "https://github.com/solokeys/admin-app", optional = true } +apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch" } +ctaphid-dispatch = { git = "https://github.com/solokeys/ctaphid-dispatch" } +ctap-types = { git = "https://github.com/solokeys/ctap-types" } +fido-authenticator = { git = "https://github.com/solokeys/fido-authenticator", optional = true } +oath-authenticator = { git = "https://github.com/trussed-dev/oath-authenticator", features = ["apdu-dispatch"], optional = true } +piv-authenticator = { git = "https://github.com/solokeys/piv-authenticator", features = ["apdu-dispatch"], optional = true } +trussed = { git = "https://github.com/trussed-dev/trussed" } # board board = { path = "board" } @@ -39,11 +41,9 @@ board = { path = "board" } # components dispatch-fido = {path = "../../components/dispatch-fido"} ndef-app = { path = "../../components/ndef-app", optional = true } -admin-app = { path = "../../components/admin-app", optional = true } # NB: when using this app, need to raise trussed/clients-5 provisioner-app = { path = "../../components/provisioner-app", optional = true } fm11nc08 = {path = "../../components/fm11nc08"} -ctaphid-dispatch = {path = "../../components/ctaphid-dispatch"} nfc-device = {path = "../../components/nfc-device"} usbd-ccid = { path = "../../components/usbd-ccid" } usbd-ctaphid = { path = "../../components/usbd-ctaphid" } diff --git a/runners/lpc55/board/Cargo.toml b/runners/lpc55/board/Cargo.toml index 4eb30268..9f2aa513 100644 --- a/runners/lpc55/board/Cargo.toml +++ b/runners/lpc55/board/Cargo.toml @@ -9,7 +9,7 @@ delog = "0.1.0" fm11nc08 = {path = "../../../components/fm11nc08"} lpc55-hal = { version = "0.3", features = ["littlefs", "rtic-peripherals"] } nb = "1" -trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main" } +trussed = { git = "https://github.com/trussed-dev/trussed" } [features] board-lpcxpresso55 = [] diff --git a/runners/pc/Cargo.toml b/runners/pc/Cargo.toml index 5eec4893..4ca6f212 100644 --- a/runners/pc/Cargo.toml +++ b/runners/pc/Cargo.toml @@ -13,19 +13,19 @@ heapless = "0.6" interchange = "0.2.0" nb = "1" -ctap-types = { git = "https://github.com/solokeys/ctap-types", branch = "main" } -fido-authenticator = { git = "https://github.com/solokeys/fido-authenticator", branch = "main" } -piv-authenticator = { git = "https://github.com/solokeys/piv-authenticator", branch = "main" } -trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main", features = ["clients-3"] } +admin-app = { git = "https://github.com/solokeys/admin-app" } +apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", features = ["std"] } +ctap-types = { git = "https://github.com/solokeys/ctap-types" } +ctaphid-dispatch = { git = "https://github.com/solokeys/ctaphid-dispatch", features = ["std"] } +fido-authenticator = { git = "https://github.com/solokeys/fido-authenticator" } +piv-authenticator = { git = "https://github.com/solokeys/piv-authenticator" } +trussed = { git = "https://github.com/trussed-dev/trussed", features = ["clients-3"] } # components usbd-ccid = { path = "../../components/usbd-ccid" } usbd-ctaphid = { path = "../../components/usbd-ctaphid" } nfc-device = {path = "./../../components/nfc-device"} -apdu-dispatch = { git = "https://github.com/solokeys/apdu-dispatch", branch = "main", features = ["std"] } -ctaphid-dispatch = {path = "./../../components/ctaphid-dispatch"} ndef-app = {path = "./../../components/ndef-app"} -admin-app = {path = "./../../components/admin-app"} dispatch-fido = {path = "./../../components/dispatch-fido"} # storage