We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0f6f4c commit e55f92bCopy full SHA for e55f92b
certificates/certificates.go
@@ -267,3 +267,12 @@ func DeleteCertificates(certDir *paths.Path) {
267
certDir.Join("cert.pem").Remove()
268
certDir.Join("cert.cer").Remove()
269
}
270
+
271
+// isExpired checks if a certificate is expired or about to expire (less than 1 month)
272
+func isExpired() bool {
273
+ bound := time.Now().AddDate(0, 1, 0)
274
+ // TODO: manage errors
275
+ dateS, _ := GetExpirationDate()
276
+ date, _ := time.Parse(time.DateTime, dateS)
277
+ return date.Before(bound)
278
+}
0 commit comments