diff --git a/Cargo.lock b/Cargo.lock index fedd6b5..7706165 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2278,9 +2278,9 @@ dependencies = [ [[package]] name = "soft-fido2" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd98aa6cfa5a8c5a955e98c4f2a542a0fdf050717bc71c5d33b33dc23580cd6a" +checksum = "699422312928d9c07d671b4fec6b95261c64c23c1709e8ccee537752191e2432" dependencies = [ "aes", "cbc", @@ -2304,9 +2304,9 @@ dependencies = [ [[package]] name = "soft-fido2-crypto" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37125a7d3c2373e67ab7443dec5e43384740ae5db249c06bd4e9f970cfd995f1" +checksum = "3cb88055bddde7a40a86e94fbbe316a0eaa157d30ad41de1af0cd235028f6452" dependencies = [ "aes", "cbc", @@ -2322,9 +2322,9 @@ dependencies = [ [[package]] name = "soft-fido2-ctap" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda2da76621aacc9a3ea2381fc1404f76dba3c760babf887465aef8146f9a083" +checksum = "3d168feb70f027fa1d496a25bdb491feee0bbb540f2e1692ac039ba83cbaec42" dependencies = [ "cbor4ii", "core2", @@ -2342,9 +2342,9 @@ dependencies = [ [[package]] name = "soft-fido2-transport" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79999bc43547850e308e4c2c9efcad5b1a93ead39a864b40958e545a6206eb94" +checksum = "2e48fc0bb0d1acb0becfe0ef0a461a5d45f936b3af860dd822d3b739a84d896d" dependencies = [ "hex", "hidapi", diff --git a/Cargo.toml b/Cargo.toml index 7120b57..869b8f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,9 @@ repository = "https://github.com/pando85/passless" passless-core = { path = "./passless-core", version = "0.6.6" } passless-config-doc = { path = "./passless-config-doc", version = "0.6.6" } -soft-fido2 = "0.9.0" -soft-fido2-ctap = "0.9.0" -soft-fido2-transport = "0.9.0" +soft-fido2 = "0.10.0" +soft-fido2-ctap = "0.10.0" +soft-fido2-transport = "0.10.0" thiserror = "2.0" clap = { version = "4.5", features = ["std", "color", "derive", "cargo", "env"] } diff --git a/cmd/passless/src/authenticator.rs b/cmd/passless/src/authenticator.rs index 2517a47..ff110ed 100644 --- a/cmd/passless/src/authenticator.rs +++ b/cmd/passless/src/authenticator.rs @@ -10,6 +10,7 @@ use soft_fido2::{ }; use std::sync::{Arc, LazyLock, Mutex}; +use std::time::{SystemTime, UNIX_EPOCH}; use log::{debug, error, info}; @@ -220,6 +221,14 @@ impl AuthenticatorCallbacks for PasslessCallbacks { debug!("Total credentials: {}", count); Ok(count) } + + fn get_timestamp_ms(&self) -> u64 { + let start = SystemTime::now(); + let since_the_epoch = start + .duration_since(UNIX_EPOCH) + .expect("Time went backwards"); + since_the_epoch.as_millis() as u64 + } } /// Main authenticator service