add disable feature to reset 10s check

This commit is contained in:
Conor Patrick
2021-04-13 22:20:53 +02:00
committed by Nicolas Stalder
parent 2788761d3f
commit 2daf52104b
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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 = []
+1
View File
@@ -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