Remove use of time.Duration.Abs

time.Duration.Abs() was added in Go 1.19
pull/731/head
Mariano Cano 2 years ago
parent 89c8c6d0a0
commit 2d582e5694
No known key found for this signature in database

@ -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) {

Loading…
Cancel
Save