Преглед изворни кода

Truncate time to the second

Mariano Cano пре 4 година
родитељ
комит
51c7f56030
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      authority/tls.go

+ 2 - 2
authority/tls.go

@@ -30,8 +30,8 @@ import (
 	casapi "github.com/smallstep/certificates/cas/apiv1"
 	casapi "github.com/smallstep/certificates/cas/apiv1"
 	"github.com/smallstep/certificates/db"
 	"github.com/smallstep/certificates/db"
 	"github.com/smallstep/certificates/errs"
 	"github.com/smallstep/certificates/errs"
-	"github.com/smallstep/nosql/database"
 	"github.com/smallstep/certificates/webhook"
 	"github.com/smallstep/certificates/webhook"
+	"github.com/smallstep/nosql/database"
 )
 )
 
 
 // GetTLSOptions returns the tls options configured.
 // 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")
 		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()
 	revokedList, err := crlDB.GetRevokedCertificates()
 	if err != nil {
 	if err != nil {
 		return errors.Wrap(err, "could not retrieve revoked certificates list from database")
 		return errors.Wrap(err, "could not retrieve revoked certificates list from database")