Skip to content

Commit

Permalink
Update apdu-dispatch
Browse files Browse the repository at this point in the history
This allows rejecting calls to `select` over NFC over NFC
  • Loading branch information
sosthene-nitrokey committed Nov 8, 2023
1 parent e4ab7c3 commit 43bcd3e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
24 changes: 21 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ ctaphid-dispatch = { git = "https://github.com/Nitrokey/ctaphid-dispatch", tag =
#apdu-dispatch = { git = "https://github.com/Nitrokey/apdu-dispatch.git", branch="sz-multiple-apps" }

# forked
admin-app = { git = "https://github.com/Nitrokey/admin-app", tag = "v0.1.0-nitrokey.3" }
admin-app = { git = "https://github.com/Nitrokey/admin-app", rev = "6c88a4bd58f2b6516c424b4dbf9581989ffa915e" }
ctap-types = { git = "https://github.com/nitrokey/ctap-types.git", tag = "v0.1.2-nitrokey.4" }
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", tag = "v0.1.1-nitrokey.7" }
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", rev = "bb6c07c12a8ea94db1dc897513cdf54f73a275e4" }
trussed = { git = "https://github.com/Nitrokey/trussed", tag = "v0.1.0-nitrokey.12" }
serde-indexed = { git = "https://github.com/sosthene-nitrokey/serde-indexed.git", rev = "5005d23cb4ee8622e62188ea0f9466146f851f0d" }

# unreleased upstream changes
usbd-ctaphid = { git = "https://github.com/Nitrokey/usbd-ctaphid", tag = "v0.1.0-nitrokey.1" }
apdu-dispatch = { git = "https://github.com/Nitrokey/apdu-dispatch", tag = "v0.1.2-nitrokey.1" }
apdu-dispatch = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "915fc237103fcecc29d0f0b73391f19abf6576de" }

# unreleased crates
trussed-auth = { git = "https://github.com/Nitrokey/trussed-auth", tag = "v0.2.2-nitrokey.1" }
Expand Down
5 changes: 5 additions & 0 deletions src/lib/ctap_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,14 @@ where
{
fn select(
&mut self,
interface: Interface,
_apdu: &apdu::Command<{ SIZE }>,
reply: &mut apdu::Data<{ apdu_dispatch::response::SIZE }>,
) -> apdu::Result {
if interface != Interface::Contactless {
return Err(Status::ConditionsOfUseNotSatisfied);
}

reply.extend_from_slice(b"U2F_V2").unwrap();
Ok(())
}
Expand Down

0 comments on commit 43bcd3e

Please sign in to comment.