mirror of
https://github.com/trussed-dev/fido-authenticator.git
synced 2026-06-20 04:16:16 -07:00
add disable feature to reset 10s check
This commit is contained in:
committed by
Nicolas Stalder
parent
2788761d3f
commit
2daf52104b
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user