Skip to content

Commit

Permalink
Use extension crates instead of trussed-staging
Browse files Browse the repository at this point in the history
This patch adapts to the extraction of extension crates from
trussed-staging, see:
        trussed-dev/trussed-staging#19
  • Loading branch information
robin-nitrokey committed Mar 13, 2024
1 parent 1c844b7 commit 6894d50
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ SPDX-License-Identifier: CC0-1.0

# Changelog

## Unreleased

- Use `trussed-chunked` and `trussed-wrap-key-to-file` instead of
`trussed-staging`, see [trussed-staging#19][].

[trussed-staging#19]: https://github.com/trussed-dev/trussed-staging/pull/19

## [v1.3.0][] (2023-12-01)

Expand Down
9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ log = "0.4"
serde = { version = "1.0", default-features = false }
subtle = { version = "2.4.1", default-features = false }
trussed = "0.1.0"
trussed-chunked = { version = "0.1.0", features = ["encrypted-chunked"] }
trussed-rsa-alloc = { version = "0.1.0", optional = true }
trussed-staging = { version = "0.1.0", features = ["wrap-key-to-file", "chunked", "encrypted-chunked"]}
trussed-wrap-key-to-file = "0.1.0"
serde_repr = "0.1"
hex-literal = "0.4.1"
trussed-auth = "0.2.1"
Expand Down Expand Up @@ -94,12 +95,14 @@ littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27
p256-cortex-m4 = { git = "https://github.com/Nitrokey/p256-cortex-m4", tag = "v0.1.0-alpha.6-nitrokey-1" }
trussed = { git = "https://github.com/Nitrokey/trussed" , tag = "v0.1.0-nitrokey.18" }
trussed-auth = { git = "https://github.com/trussed-dev/trussed-auth.git", rev = "4b8191f248c26cb074cdac887c7f3f48f9c449a4"}
trussed-chunked = { git = "https://github.com/Nitrokey/trussed-staging.git", branch = "extensions" }
trussed-manage = { git = "https://github.com/Nitrokey/trussed-staging.git", branch = "extensions" }
trussed-rsa-alloc = { git = "https://github.com/trussed-dev/trussed-rsa-backend.git", rev = "9732a9a3e98af72112286afdc9b7174c66c2869a" }
trussed-staging = { git = "https://github.com/Nitrokey/trussed-staging.git", tag = "v0.1.0-nitrokey-hmac256p256.3" }
trussed-wrap-key-to-file = { git = "https://github.com/Nitrokey/trussed-staging.git", branch = "extensions" }
apdu-dispatch = { git = "https://github.com/Nitrokey/apdu-dispatch", tag = "v0.1.2-nitrokey.2" }
trussed-usbip = { git = "https://github.com/Nitrokey/pc-usbip-runner.git", tag = "v0.0.1-nitrokey.1" }
usbd-ccid = { git = "https://github.com/Nitrokey/usbd-ccid", tag = "v0.2.0-nitrokey.1" }
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", rev = "410899311ae7b194360366ff477f74d4d278e056" }
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", branch = "extensions" }
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" }

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions src/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use hex_literal::hex;
use iso7816::Status;
use trussed::types::Location;
use trussed_auth::AuthClient;
use trussed_staging::streaming::ChunkedClient;
use trussed_chunked::ChunkedClient;

pub(crate) mod reply;

Expand Down Expand Up @@ -356,7 +356,7 @@ mod tests {
}
}

use trussed_staging::wrap_key_to_file::WrapKeyToFileClient;
use trussed_wrap_key_to_file::WrapKeyToFileClient;

/// Super trait with all trussed extensions required by opcard
pub trait Client: trussed::Client + AuthClient + WrapKeyToFileClient + ChunkedClient {}
Expand Down
2 changes: 1 addition & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use trussed::api::reply::Metadata;
use trussed::config::MAX_MESSAGE_LENGTH;
use trussed::types::{KeyId, Location, Mechanism, PathBuf, StorageAttributes};
use trussed::{syscall, try_syscall};
use trussed_staging::streaming::utils::{write_all, EncryptionData};
use trussed_chunked::utils::{write_all, EncryptionData};

use crate::card::reply::Reply;
use crate::command::{Password, PasswordMode};
Expand Down

0 comments on commit 6894d50

Please sign in to comment.