Merge pull request #15 from Nitrokey/interrupt

Adapt to interrupt mechanism
This commit is contained in:
sosthene-nitrokey
2023-06-20 17:51:44 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -45,4 +45,5 @@ rand = "0.8.4"
features = ["dispatch"]
[patch.crates-io]
trussed = { git = "https://github.com/trussed-dev/trussed", rev = "55ea391367fce4bf5093ff2d3c79041d7aef0485" }
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" }
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "51e68500d7601d04f884f5e95567d14b9018a6cb" }
+6 -1
View File
@@ -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<UP, T> ctaphid::App for Authenticator<UP, T>
impl<UP, T> ctaphid::App<'static> for Authenticator<UP, T>
where
UP: UserPresence,
T: TrussedRequirements,
@@ -41,4 +42,8 @@ where
};
Ok(())
}
fn interrupt(&self) -> Option<&'static InterruptFlag> {
self.trussed.interrupt()
}
}