diff --git a/Cargo.lock b/Cargo.lock index bbbb47d..bb271d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,12 +5,17 @@ version = 3 [[package]] name = "admin-app" version = "0.1.0" -source = "git+https://github.com/Nitrokey/admin-app?tag=v0.1.0-nitrokey.3#15aec92ff3f30f2ad1ff157ac5077c7211a04c77" +source = "git+https://github.com/Nitrokey/admin-app?rev=dfd54a67d40f32e47f0a43711c46510a89e20ea8#dfd54a67d40f32e47f0a43711c46510a89e20ea8" dependencies = [ "apdu-dispatch", + "cbor-smol", "ctaphid-dispatch", "delog", + "hex-literal", "iso7816", + "littlefs2", + "serde", + "strum_macros", "trussed", ] @@ -48,7 +53,7 @@ dependencies = [ [[package]] name = "apdu-dispatch" version = "0.1.2" -source = "git+https://github.com/Nitrokey/apdu-dispatch?tag=v0.1.2-nitrokey.1#b72d5eb9f4d7a3f107a78a2f0e41f3c403f4c7a4" +source = "git+https://github.com/trussed-dev/apdu-dispatch.git?rev=915fc237103fcecc29d0f0b73391f19abf6576de#915fc237103fcecc29d0f0b73391f19abf6576de" dependencies = [ "delog", "heapless", @@ -550,7 +555,7 @@ dependencies = [ [[package]] name = "fido-authenticator" version = "0.1.1" -source = "git+https://github.com/Nitrokey/fido-authenticator.git?rev=82a85dc5fd88d32259b9e3f4f5542bc28b8c4f55#82a85dc5fd88d32259b9e3f4f5542bc28b8c4f55" +source = "git+https://github.com/Nitrokey/fido-authenticator.git?rev=aa769b243bce8490a361f51de62761255ab561c6#aa769b243bce8490a361f51de62761255ab561c6" dependencies = [ "apdu-dispatch", "ctap-types", @@ -1518,6 +1523,19 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.28", +] + [[package]] name = "subtle" version = "2.5.0" diff --git a/Cargo.toml b/Cargo.toml index b200348..9558efa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 = "dfd54a67d40f32e47f0a43711c46510a89e20ea8" } ctap-types = { git = "https://github.com/nitrokey/ctap-types.git", rev = "de8aa1f3dc4f773160f427680e854759bed869d7" } -fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", rev = "82a85dc5fd88d32259b9e3f4f5542bc28b8c4f55" } +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" } diff --git a/src/lib/ctap_app.rs b/src/lib/ctap_app.rs index f81464f..68cbafc 100644 --- a/src/lib/ctap_app.rs +++ b/src/lib/ctap_app.rs @@ -299,9 +299,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(()) }