Skip to content

Commit

Permalink
chore: replace instant with web-time [WPB-14399]
Browse files Browse the repository at this point in the history
instant is no longer maintained the recommended alternative is web-time.
  • Loading branch information
typfel committed Dec 13, 2024
1 parent 6d2f5a2 commit 2574418
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openmls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ openmls_basic_credential = { version = "0.2.0", path = "../basic_credential", fe
openmls_x509_credential = { version = "0.2.0", path = "../x509_credential" }
x509-cert = "0.2"
subtle = "2.5"
fluvio-wasm-timer = "0.2"
web-time = "1.1.0"
indexmap = "2.0"
itertools = "0.12"

Expand Down
2 changes: 1 addition & 1 deletion openmls/src/key_packages/lifetime.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use fluvio_wasm_timer::{SystemTime, UNIX_EPOCH};
use web_time::{SystemTime, UNIX_EPOCH};

use serde::{Deserialize, Serialize};
use tls_codec::{TlsDeserialize, TlsSerialize, TlsSize};
Expand Down
2 changes: 1 addition & 1 deletion x509_credential/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tls_codec = { workspace = true }
async-trait = { workspace = true }
serde = "1.0"
openmls_basic_credential = { version = "0.2.0", path = "../basic_credential" }
fluvio-wasm-timer = "0.2"
web-time = "1.1.0"
base64 = "0.21"
uuid = "1.4"
percent-encoding = "2.3"
Expand Down
4 changes: 2 additions & 2 deletions x509_credential/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ impl X509Ext for Certificate {
not_after,
} = self.tbs_certificate.validity;

let now = fluvio_wasm_timer::SystemTime::now();
let now = web_time::SystemTime::now();
let now = now
.duration_since(fluvio_wasm_timer::UNIX_EPOCH)
.duration_since(web_time::UNIX_EPOCH)
.map_err(|_| CryptoError::TimeError)?;

let is_nbf = now > not_before.to_unix_duration();
Expand Down

0 comments on commit 2574418

Please sign in to comment.