From 51c7f560307e332bbe5e5fc87178d61d4ec0fbf2 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 27 Oct 2022 11:57:48 -0700 Subject: [PATCH] Truncate time to the second --- authority/tls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/authority/tls.go b/authority/tls.go index 184944a0..e80c9091 100644 --- a/authority/tls.go +++ b/authority/tls.go @@ -30,8 +30,8 @@ import ( casapi "github.com/smallstep/certificates/cas/apiv1" "github.com/smallstep/certificates/db" "github.com/smallstep/certificates/errs" - "github.com/smallstep/nosql/database" "github.com/smallstep/certificates/webhook" + "github.com/smallstep/nosql/database" ) // GetTLSOptions returns the tls options configured. @@ -689,7 +689,7 @@ func (a *Authority) GenerateCertificateRevocationList() error { return errors.Wrap(err, "could not retrieve CRL from database") } - now := time.Now().UTC() + now := time.Now().Truncate(time.Second).UTC() revokedList, err := crlDB.GetRevokedCertificates() if err != nil { return errors.Wrap(err, "could not retrieve revoked certificates list from database")