Skip to content

Commit 431d1ed

Browse files
committed
linter warnings resolved
1 parent 613deeb commit 431d1ed

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎options.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,13 @@ func validateNonceOption(value any) (string, error) {
368368
// WithValidityTolerance specifies the allowed clock skew for created and
369369
// expires timestamp checks. The duration must not be negative; zero allows
370370
// no clock skew.
371-
func WithValidityTolerance(d time.Duration) VerifierOption {
371+
func WithValidityTolerance(tolerance time.Duration) VerifierOption {
372372
return verifierOptionFunc(func(_ *verifier, e *verificationPolicy, _ bool) error {
373-
if d < 0 {
373+
if tolerance < 0 {
374374
return fmt.Errorf("%w: validity tolerance must not be negative", ErrParameter)
375375
}
376376

377-
e.tolerance = &d
377+
e.tolerance = &tolerance
378378

379379
return nil
380380
})

‎verification_policy.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ func (e *verificationPolicy) assertMetadata(si *signatureInput, msg *Message) er
256256
)
257257

258258
now := time.Now().UTC()
259+
259260
if e.tolerance != nil {
260261
tolerance = *e.tolerance
261262
}

0 commit comments

Comments
 (0)