From 76d3d88b374658d96bd3fe8bb02775f954db11c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Tue, 23 May 2023 09:35:27 +0200 Subject: [PATCH 1/4] Adapt to interrupt mechanism --- Cargo.toml | 4 +++- src/dispatch/ctaphid.rs | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9cde74c..3d4f8f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,4 +45,6 @@ rand = "0.8.4" features = ["dispatch"] [patch.crates-io] -trussed = { git = "https://github.com/trussed-dev/trussed", rev = "55ea391367fce4bf5093ff2d3c79041d7aef0485" } +ref-swap = { git = "https://github.com/nitrokey/ref-swap.git", rev = "de0330e85b479074ae03bcc05888cfeff682f61e" } +ctaphid-dispatch = { git = "https://github.com/sosthene-nitrokey/ctaphid-dispatch.git", rev = "a5a3696d7cf0665414cf57cdea384dbc8a157f33" } +trussed = { git = "https://github.com/sosthene-nitrokey/trussed.git", rev = "6f095e14b27bd58ab8fa56cf6c616266d92fbfb4" } diff --git a/src/dispatch/ctaphid.rs b/src/dispatch/ctaphid.rs index 60f0c8e..adb931f 100644 --- a/src/dispatch/ctaphid.rs +++ b/src/dispatch/ctaphid.rs @@ -3,8 +3,9 @@ use ctaphid_dispatch::app as ctaphid; #[allow(unused_imports)] use crate::msp; use crate::{Authenticator, TrussedRequirements, UserPresence}; +use trussed::interrupt::InterruptFlag; -impl ctaphid::App for Authenticator +impl ctaphid::App<'static> for Authenticator where UP: UserPresence, T: TrussedRequirements, @@ -41,4 +42,8 @@ where }; Ok(()) } + + fn interrupt(&self) -> Option<&'static InterruptFlag> { + self.trussed.interrupt() + } } From 0d2ddcf1f6e2c1b66f2d1bf1d2a607a9db6af6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 31 May 2023 10:58:28 +0200 Subject: [PATCH 2/4] Use published ref-swap --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3d4f8f9..8703a4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,5 @@ rand = "0.8.4" features = ["dispatch"] [patch.crates-io] -ref-swap = { git = "https://github.com/nitrokey/ref-swap.git", rev = "de0330e85b479074ae03bcc05888cfeff682f61e" } ctaphid-dispatch = { git = "https://github.com/sosthene-nitrokey/ctaphid-dispatch.git", rev = "a5a3696d7cf0665414cf57cdea384dbc8a157f33" } trussed = { git = "https://github.com/sosthene-nitrokey/trussed.git", rev = "6f095e14b27bd58ab8fa56cf6c616266d92fbfb4" } From 887c75104512c3bfc2b51733f83e86ad14ee198f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Tue, 6 Jun 2023 17:41:13 +0200 Subject: [PATCH 3/4] Bump deps --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8703a4b..53feb52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,5 +45,5 @@ rand = "0.8.4" features = ["dispatch"] [patch.crates-io] -ctaphid-dispatch = { git = "https://github.com/sosthene-nitrokey/ctaphid-dispatch.git", rev = "a5a3696d7cf0665414cf57cdea384dbc8a157f33" } +ctaphid-dispatch = { git = "https://github.com/sosthene-nitrokey/ctaphid-dispatch.git", rev = "cb3c35f622b578d8d364e85c5e29f207201a5060" } trussed = { git = "https://github.com/sosthene-nitrokey/trussed.git", rev = "6f095e14b27bd58ab8fa56cf6c616266d92fbfb4" } From 26c34a8894e9c5b00d0d53aa0d0918b44e7446e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Tue, 20 Jun 2023 17:48:55 +0200 Subject: [PATCH 4/4] Use merged PRs --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 53feb52..9d9eaec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,5 +45,5 @@ rand = "0.8.4" features = ["dispatch"] [patch.crates-io] -ctaphid-dispatch = { git = "https://github.com/sosthene-nitrokey/ctaphid-dispatch.git", rev = "cb3c35f622b578d8d364e85c5e29f207201a5060" } -trussed = { git = "https://github.com/sosthene-nitrokey/trussed.git", rev = "6f095e14b27bd58ab8fa56cf6c616266d92fbfb4" } +ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" } +trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "51e68500d7601d04f884f5e95567d14b9018a6cb" }