From 436ff4ef635114552982602f91949f8fcaa624ab Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Thu, 10 Oct 2019 03:35:32 +0200 Subject: [PATCH] fix cert rotation function --- pkg/daemons/control/server.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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]) }