Skip to content

Commit

Permalink
Remove usbip example
Browse files Browse the repository at this point in the history
Maintaining a working usbip runner using admin-app and
fido-authenticator requires lots of effort and code duplication and is
out of scope for this repository.

Instead, the usbip runner in the nitrokey-3-firmware repository can be
used for development and testing.
  • Loading branch information
robin-nitrokey committed Oct 21, 2024
1 parent a7e15ef commit b134a45
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 614 deletions.
43 changes: 3 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,6 @@ bitflags = "2.3.1"
# extension
trussed-auth = "0.3.0"

[dev-dependencies]
log = { version = "0.4.14", default-features = false }
pretty_env_logger = "0.4.0"

# below are for running the usbip example
trussed-usbip = { version = "0.0.1", features = ["ctaphid"], default-features = false }
usbd-ctaphid = "0.1"
clap = { version = "3.0.0", features = ["cargo", "derive"] }
clap-num = "1.0.0"
delog = { version = "0.1.6", features = ["std-log"] }
fido-authenticator = { version = "0.1.1", features = ["dispatch", "log-all"]}
trussed-staging = { version = "0.3.0", features = ["hkdf"] }
trussed-hkdf = "0.2.0"

admin-app = { version = "0.1", features = ["log-all"] }

[features]
default = ["apdu-dispatch"]
devel = ["apdu-dispatch", "log-all", "delog/std-log", "devel-counters"]
Expand All @@ -58,38 +42,17 @@ calculate-all = []
# Require delay after failed request as a brute-force protection for Reverese HOTP Verification
brute-force-delay = []


log-all = []
log-none = []
log-info = []
log-debug = []
log-warn = []
log-error = []

[[example]]
name="usbip"
required-features = ["ctaphid", "devel"]


[patch.crates-io]
littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27e49ca321089d01d8c9b169c4aeb58ceeeca" }
flexiber = { git = "https://github.com/Nitrokey/flexiber", tag = "0.1.1.nitrokey" }
apdu-dispatch = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "915fc237103fcecc29d0f0b73391f19abf6576de" }

# forked
admin-app = { git = "https://github.com/Nitrokey/admin-app", rev = "6c88a4bd58f2b6516c424b4dbf9581989ffa915e" }
ctap-types = { git = "https://github.com/trussed-dev/ctap-types.git", rev = "4846817d9cd44604121680a19d46f3264973a3ce" }
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", tag = "v0.1.1-nitrokey.14" }
trussed = { git = "https://github.com/Nitrokey/trussed", tag = "v0.1.0-nitrokey.18" }

# unreleased upstream changes
usbd-ctaphid = { git = "https://github.com/Nitrokey/usbd-ctaphid", tag = "v0.1.0-nitrokey.1" }
ctaphid-dispatch = { git = "https://github.com/Nitrokey/ctaphid-dispatch", tag = "v0.1.1-nitrokey.2" }
serde-indexed = { git = "https://github.com/nitrokey/serde-indexed.git", tag = "v0.1.0-nitrokey.2" }

# unreleased crates
flexiber = { git = "https://github.com/Nitrokey/flexiber", tag = "0.1.1.nitrokey" }
littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27e49ca321089d01d8c9b169c4aeb58ceeeca" }
trussed = { git = "https://github.com/Nitrokey/trussed", tag = "v0.1.0-nitrokey.18" }
trussed-auth = { git = "https://github.com/trussed-dev/trussed-auth", tag = "v0.3.0" }
trussed-usbip = { git = "https://github.com/Nitrokey/pc-usbip-runner", tag = "v0.0.1-nitrokey.1" }
trussed-hkdf = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "hkdf-v0.2.0" }
trussed-chunked = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "chunked-v0.1.0" }
trussed-staging = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "v0.3.0" }
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
.PHONY: ci setup-ubuntu run

FLAGS=--example usbip --features "ctaphid devel"

ci:
cargo check --all-targets
cargo check --all-targets --features apdu-dispatch,ctaphid
cargo test --verbose
cargo build $(FLAGS)

run:
env RUST_LOG=debug cargo run $(FLAGS)

setup-ubuntu:
sudo apt install llvm libclang-dev make
sudo apt install llvm libclang-dev make
97 changes: 0 additions & 97 deletions examples/Makefile

This file was deleted.

Loading

0 comments on commit b134a45

Please sign in to comment.