Skip to content

Commit

Permalink
fix: Make anto-replay window 1s for tests (#2116)
Browse files Browse the repository at this point in the history
This caused some test failures, and @martinthomson discovered this
as the reason at the IETF 120 hackathon.

Broken out of #1998
  • Loading branch information
larseggert authored Sep 18, 2024
1 parent eb3e835 commit d6279bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test-fixture/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ pub fn fixture_init() {

// This needs to be > 2ms to avoid it being rounded to zero.
// NSS operates in milliseconds and halves any value it is provided.
pub const ANTI_REPLAY_WINDOW: Duration = Duration::from_millis(10);
// But make it a second, so that tests with reasonable RTTs don't fail.
pub const ANTI_REPLAY_WINDOW: Duration = Duration::from_millis(1000);

/// A baseline time for all tests. This needs to be earlier than what `now()` produces
/// because of the need to have a span of time elapse for anti-replay purposes.
Expand Down

0 comments on commit d6279bf

Please sign in to comment.