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 b5cc662
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 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" }
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" }
admin-app = { git = "https://github.com/Nitrokey/admin-app", rev = "dfd54a67d40f32e47f0a43711c46510a89e20ea8" }
ctap-types = { git = "https://github.com/nitrokey/ctap-types.git", rev = "de8aa1f3dc4f773160f427680e854759bed869d7" }
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", rev = "aa769b243bce8490a361f51de62761255ab561c6" }
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 b5cc662

Please sign in to comment.