diff --git a/Cargo.toml b/Cargo.toml index a9124f0..9cde74c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ ctap-types = "0.1.0" delog = "0.1.0" heapless = "0.7" interchange = "0.2.0" -littlefs2 = "0.3.1" serde = { version = "1.0", default-features = false } serde_cbor = { version = "0.11.0", default-features = false } serde-indexed = "0.1.0" @@ -44,3 +43,6 @@ rand = "0.8.4" [package.metadata.docs.rs] features = ["dispatch"] + +[patch.crates-io] +trussed = { git = "https://github.com/trussed-dev/trussed", rev = "55ea391367fce4bf5093ff2d3c79041d7aef0485" } diff --git a/src/credential.rs b/src/credential.rs index d71fd50..f00f98f 100644 --- a/src/credential.rs +++ b/src/credential.rs @@ -252,7 +252,8 @@ impl Credential { let nonce: [u8; 12] = self.nonce.as_slice().try_into().unwrap(); let encrypted_serialized_credential = EncryptedSerializedCredential(syscall!(trussed .encrypt_chacha8poly1305(key_encryption_key, message, associated_data, Some(&nonce)))); - let credential_id: CredentialId = encrypted_serialized_credential.try_into() + let credential_id: CredentialId = encrypted_serialized_credential + .try_into() .map_err(|_| Error::RequestTooLarge)?; Ok(credential_id) diff --git a/src/ctap2.rs b/src/ctap2.rs index 9be3333..6ce9d30 100644 --- a/src/ctap2.rs +++ b/src/ctap2.rs @@ -7,12 +7,10 @@ use ctap_types::{ sizes, Error, }; -use littlefs2::path::Path; - use trussed::{ syscall, try_syscall, types::{ - KeyId, KeySerialization, Location, Mechanism, MediumData, Message, PathBuf, + KeyId, KeySerialization, Location, Mechanism, MediumData, Message, Path, PathBuf, SignatureSerialization, }, }; diff --git a/src/ctap2/credential_management.rs b/src/ctap2/credential_management.rs index d8bc26f..ed6f75e 100644 --- a/src/ctap2/credential_management.rs +++ b/src/ctap2/credential_management.rs @@ -4,7 +4,7 @@ use core::convert::TryFrom; use trussed::{ syscall, - types::{DirEntry, Location}, + types::{DirEntry, Location, Path, PathBuf}, }; use ctap_types::{ @@ -15,8 +15,6 @@ use ctap_types::{ Error, }; -use littlefs2::path::{Path, PathBuf}; - use crate::{ credential::Credential, state::{CredentialManagementEnumerateCredentials, CredentialManagementEnumerateRps}, diff --git a/src/dispatch.rs b/src/dispatch.rs index fb65133..08d1fc7 100644 --- a/src/dispatch.rs +++ b/src/dispatch.rs @@ -112,9 +112,7 @@ where // Goal of these nested scopes is to keep stack small. let ctap_response = { - let ctap_request = { - ctap1::Request::try_from(command)? - }; + let ctap_request = { ctap1::Request::try_from(command)? }; ctap1::Authenticator::call_ctap1(authenticator, &ctap_request)? }; // debug!("1b SP: {:X}", msp()); diff --git a/src/state.rs b/src/state.rs index 69d608f..20eaeef 100644 --- a/src/state.rs +++ b/src/state.rs @@ -12,12 +12,11 @@ use ctap_types::{ }; use trussed::{ client, syscall, try_syscall, - types::{self, KeyId, Location, Mechanism}, + types::{self, KeyId, Location, Mechanism, PathBuf}, Client as TrussedClient, }; use heapless::binary_heap::{BinaryHeap, Max}; -use littlefs2::path::PathBuf; use crate::{cbor_serialize_message, credential::Credential, Result};