Skip to content

Commit

Permalink
verifier: fixup time range check
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Pan <[email protected]>
  • Loading branch information
tnytown committed Apr 11, 2024
1 parent 3f150a2 commit 81ae539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/verify/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl AsyncVerifier {
.not_after
.to_unix_duration()
.as_secs();
if !(not_before <= integrated_time && integrated_time <= not_after) {
if integrated_time < not_before || integrated_time > not_after {
return Err(CertificateErrorKind::Expired)?;
}
debug!("data signed during validity period");
Expand Down

0 comments on commit 81ae539

Please sign in to comment.