Skip to content

Commit d8b70c6

Browse files
Bump trussed to 0.2.0
1 parent d3e1753 commit d8b70c6

6 files changed

Lines changed: 9 additions & 13 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ctap-types = "0.1.0"
1515
delog = "0.1.0"
1616
heapless = "0.7"
1717
interchange = "0.2.0"
18-
littlefs2 = "0.3.1"
1918
serde = { version = "1.0", default-features = false }
2019
serde_cbor = { version = "0.11.0", default-features = false }
2120
serde-indexed = "0.1.0"
@@ -44,3 +43,6 @@ rand = "0.8.4"
4443

4544
[package.metadata.docs.rs]
4645
features = ["dispatch"]
46+
47+
[patch.crates-io]
48+
trussed = { git = "https://github.com/robin-nitrokey/trussed", branch = "littlefs2" }

src/credential.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ impl Credential {
252252
let nonce: [u8; 12] = self.nonce.as_slice().try_into().unwrap();
253253
let encrypted_serialized_credential = EncryptedSerializedCredential(syscall!(trussed
254254
.encrypt_chacha8poly1305(key_encryption_key, message, associated_data, Some(&nonce))));
255-
let credential_id: CredentialId = encrypted_serialized_credential.try_into()
255+
let credential_id: CredentialId = encrypted_serialized_credential
256+
.try_into()
256257
.map_err(|_| Error::RequestTooLarge)?;
257258

258259
Ok(credential_id)

src/ctap2.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ use ctap_types::{
77
sizes, Error,
88
};
99

10-
use littlefs2::path::Path;
11-
1210
use trussed::{
1311
syscall, try_syscall,
1412
types::{
15-
KeyId, KeySerialization, Location, Mechanism, MediumData, Message, PathBuf,
13+
KeyId, KeySerialization, Location, Mechanism, MediumData, Message, Path, PathBuf,
1614
SignatureSerialization,
1715
},
1816
};

src/ctap2/credential_management.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use core::convert::TryFrom;
44

55
use trussed::{
66
syscall,
7-
types::{DirEntry, Location},
7+
types::{DirEntry, Location, Path, PathBuf},
88
};
99

1010
use ctap_types::{
@@ -15,8 +15,6 @@ use ctap_types::{
1515
Error,
1616
};
1717

18-
use littlefs2::path::{Path, PathBuf};
19-
2018
use crate::{
2119
credential::Credential,
2220
state::{CredentialManagementEnumerateCredentials, CredentialManagementEnumerateRps},

src/dispatch.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ where
112112

113113
// Goal of these nested scopes is to keep stack small.
114114
let ctap_response = {
115-
let ctap_request = {
116-
ctap1::Request::try_from(command)?
117-
};
115+
let ctap_request = { ctap1::Request::try_from(command)? };
118116
ctap1::Authenticator::call_ctap1(authenticator, &ctap_request)?
119117
};
120118
// debug!("1b SP: {:X}", msp());

src/state.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ use ctap_types::{
1212
};
1313
use trussed::{
1414
client, syscall, try_syscall,
15-
types::{self, KeyId, Location, Mechanism},
15+
types::{self, KeyId, Location, Mechanism, PathBuf},
1616
Client as TrussedClient,
1717
};
1818

1919
use heapless::binary_heap::{BinaryHeap, Max};
20-
use littlefs2::path::PathBuf;
2120

2221
use crate::{cbor_serialize_message, credential::Credential, Result};
2322

0 commit comments

Comments
 (0)