Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement clock tolerance #8

Merged
merged 2 commits into from
Aug 15, 2023
Merged

Implement clock tolerance #8

merged 2 commits into from
Aug 15, 2023

Conversation

cobward
Copy link
Contributor

@cobward cobward commented Aug 15, 2023

No description provided.

@cobward cobward requested review from wyc and dean-f451 August 15, 2023 17:33
if let Some(not_before) = self.body.not_before.clone() {
let nbf = not_before.try_into()?;
if now < nbf {
if (now + nbf_tolerance) < nbf {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to think about whether the operation should be addition or subtraction and whether nbf_tolerance is a positive or negative duration, but I think I've convinced myself this is correct. Looking at the test code helped.

@cobward cobward merged commit faa8e27 into main Aug 15, 2023
2 checks passed
@cobward cobward deleted the feat/clock-tolerance branch August 15, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants