From 2daf52104bfa03cb91df425fc1289c1fc305257e Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Fri, 26 Mar 2021 01:32:27 -0700 Subject: [PATCH] add disable feature to reset 10s check --- Cargo.toml | 2 ++ src/lib.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a8e8f2a..4a71a43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,8 @@ trussed = { git = "https://github.com/trussed-dev/trussed", branch = "main" } [features] enable-fido-pre = [] +disable-reset-time-window = [] + log-all = [] log-none = [] log-info = [] diff --git a/src/lib.rs b/src/lib.rs index f5e5447..a93f27b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1510,6 +1510,7 @@ where UP: UserPresence, // 1. >10s after bootup -> NotAllowed let uptime = syscall!(self.trussed.uptime()).uptime; if uptime.as_secs() > 10 { + #[cfg(not(feature = "disable-reset-time-window"))] return Err(Error::NotAllowed); } // 2. check for user presence