Unverified Commit 54b0ee9d authored by Calvin Leung Huang's avatar Calvin Leung Huang Committed by GitHub
Browse files

Use inclusive range on cert role diff comparison (#5737)

Showing with 1 addition and 1 deletion
+1 -1
......@@ -984,7 +984,7 @@ func generateRoleSteps(t *testing.T, useCSRs bool) []logicaltest.TestStep {
actualDiff := time.Now().Sub(cert.NotBefore)
certRoleDiff := (role.NotBeforeDuration - actualDiff).Truncate(time.Second)
// These times get truncated, so give a 1 second buffer on each side
if certRoleDiff > -1*time.Second && certRoleDiff < 1*time.Second {
if certRoleDiff >= -1*time.Second && certRoleDiff <= 1*time.Second {
return nil
}
return fmt.Errorf("validity period out of range diff: %v", certRoleDiff)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment