fix cert rotation function

This commit is contained in:
galal-hussein 2019-10-10 03:35:32 +02:00
parent f8ec6f905a
commit 436ff4ef63

View File

@ -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
} }