diff --git a/pkg/daemons/control/server.go b/pkg/daemons/control/server.go index bd1bdf1a9f..d1fb15e142 100644 --- a/pkg/daemons/control/server.go +++ b/pkg/daemons/control/server.go @@ -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]) }