Remove use of time.Duration.Abs

time.Duration.Abs() was added in Go 1.19
This commit is contained in:
Mariano Cano 2022-10-27 12:20:13 -07:00
parent 89c8c6d0a0
commit 2d582e5694
No known key found for this signature in database

View File

@ -706,7 +706,7 @@ func (a *Authority) GenerateCertificateRevocationList() error {
// Convert our database db.RevokedCertificateInfo types into the pkix
// representation ready for the CAS to sign it
var revokedCertificates []pkix.RevokedCertificate
skipExpiredTime := now.Add(-config.DefaultCRLExpiredDuration.Abs())
skipExpiredTime := now.Add(-config.DefaultCRLExpiredDuration)
for _, revokedCert := range *revokedList {
// skip expired certificates
if !revokedCert.ExpiresAt.IsZero() && revokedCert.ExpiresAt.Before(skipExpiredTime) {