fix cert rotation function

pull/886/head
galal-hussein 5 years ago
parent f8ec6f905a
commit 436ff4ef63

@ -796,11 +796,5 @@ func expired(certFile string) bool {
if err != nil { if err != nil {
return false return false
} }
expirationDate := certificates[0].NotAfter return certutil.IsCertExpired(certificates[0])
diffDays := expirationDate.Sub(time.Now()).Hours() / 24.0
if diffDays <= 90 {
logrus.Infof("certificate %s is about to expire", certFile)
return true
}
return false
} }

Loading…
Cancel
Save