Commit 436ff4ef authored by galal-hussein's avatar galal-hussein

fix cert rotation function

parent f8ec6f90
......@@ -796,11 +796,5 @@ func expired(certFile string) bool {
if err != nil {
return false
}
expirationDate := certificates[0].NotAfter
diffDays := expirationDate.Sub(time.Now()).Hours() / 24.0
if diffDays <= 90 {
logrus.Infof("certificate %s is about to expire", certFile)
return true
}
return false
return certutil.IsCertExpired(certificates[0])
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment