Skip to content

Commit

Permalink
Use trussed-core and remove default features for trussed
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Jan 8, 2025
1 parent c030b82 commit fc53539
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Use serde(rename) to save space on on the size of stored credentials ([#38][])
- Remove the `dat` intermediary directory in file storage ([#39][])
- Use `trussed-core` and remove default features for `trussed`

[#38]: https://github.com/trussed-dev/trussed-auth/pull/38
[#39]: https://github.com/trussed-dev/trussed-auth/pull/39
Expand Down
13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ serde = { version = "1", default-features = false }
serde-byte-array = "0.1.2"
sha2 = { version = "0.10.6", default-features = false }
subtle = { version = "2.4.1", default-features = false }
trussed = { version = "0.1.0", features = ["serde-extensions"] }
trussed = { version = "0.1.0", default-features = false, features = ["serde-extensions"] }
trussed-core = { version = "0.1.0-rc.1", features = ["serde-extensions"] }
littlefs2-core = "0.1.0"

[dev-dependencies]
quickcheck = { version = "1.0.3", default-features = false }
rand_core = { version = "0.6.4", default-features = false, features = ["getrandom"] }
serde_test = "1.0.176"
trussed = { version = "0.1.0", features = ["serde-extensions", "virt"] }
trussed = { version = "0.1.0", default-features = false, features = ["clients-1", "crypto-client", "filesystem-client", "hmac-sha256", "serde-extensions", "virt"] }
admin-app = { version = "0.1.0", features = ["migration-tests"] }
serde_cbor = { version = "0.11.2", features = ["std"] }
hex-literal = "0.4.1"

[patch.crates-io]
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "046478b7a4f6e2315acf9112d98308379c2e3eee" }
trussed-manage = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "manage-v0.1.0" }
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" }
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", tag = "v0.1.0-nitrokey.18" }
cbor-smol = { git = "https://github.com/Nitrokey/cbor-smol.git", tag = "v0.4.0-nitrokey.2" }
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "6bba8fde36d05c0227769eb63345744e87d84b2b" }
trussed-manage = { git = "https://github.com/trussed-dev/trussed-staging.git", rev = "9355f700831c1a278c334f76382fbf98d82aedcd" }
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", branch = "ctaphid-app" }
2 changes: 1 addition & 1 deletion src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub mod reply;
pub mod request;

use serde::{Deserialize, Serialize};
use trussed::{
use trussed_core::{
serde_extensions::{Extension, ExtensionClient, ExtensionResult},
types::{KeyId, Message},
};
Expand Down
5 changes: 1 addition & 4 deletions src/extension/reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 or MIT

use serde::{Deserialize, Serialize};
use trussed::{
error::{Error, Result},
types::KeyId,
};
use trussed_core::{types::KeyId, Error, Result};

use super::AuthReply;

Expand Down
2 changes: 1 addition & 1 deletion src/extension/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 or MIT

use serde::{Deserialize, Serialize};
use trussed::types::{KeyId, Message};
use trussed_core::types::{KeyId, Message};

use super::AuthRequest;
use crate::{Pin, PinId};
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//! # Examples
//!
//! ```
//! use trussed::{Bytes, syscall};
//! use trussed_core::{types::Bytes, syscall};
//! use trussed_auth::{AuthClient, PinId};
//!
//! #[repr(u8)]
Expand Down Expand Up @@ -69,7 +69,7 @@ use core::str::FromStr;

use littlefs2_core::{path, Path, PathBuf};
use serde::{Deserialize, Serialize};
use trussed::{config::MAX_SHORT_DATA_LENGTH, types::Bytes};
use trussed_core::{config::MAX_SHORT_DATA_LENGTH, types::Bytes};

pub use backend::{AuthBackend, AuthContext, FilesystemLayout, MAX_HW_KEY_LEN};
pub use extension::{
Expand Down Expand Up @@ -174,7 +174,7 @@ impl FromStr for PinId {
#[cfg(test)]
mod tests {
use super::PinId;
use trussed::types::PathBuf;
use trussed_core::types::PathBuf;

#[test]
fn pin_id_path() {
Expand Down

0 comments on commit fc53539

Please sign in to comment.