diff --git a/launch.go b/launch.go index 6968709..42658e2 100644 --- a/launch.go +++ b/launch.go @@ -11,6 +11,7 @@ import ( "strconv" "sync" "syscall" + "time" ) var VERSION = "0.0.0" @@ -79,6 +80,11 @@ func launch(config Config, privInfo userInfo) int { log.Println("Invalid TLS certificate: " + err.Error()) return 1 } + // Warn if certificate is expired + now := time.Now() + if now.After(certx509.NotAfter) { + log.Println("Hey, your certificate expired on " + certx509.NotAfter.String() + "!!!") + } // Load certificate and private key cert, err := tls.LoadX509KeyPair(config.CertPath, config.KeyPath)