/tls/configure and /tls/validate -- make validation failures non-fatal

This commit is contained in:
Eugene Bujak
2019-02-15 17:06:55 +03:00
parent cb97c221fd
commit d44f68e844
2 changed files with 48 additions and 41 deletions

6
app.go
View File

@@ -178,9 +178,9 @@ func run(args options) {
}
address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.TLS.PortHTTPS))
// validate current TLS config and update warnings (it could have been loaded from file)
data, err := validateCertificates(config.TLS)
if err != nil {
log.Fatal(err)
data := validateCertificates(config.TLS)
if data.WarningValidation != "" {
log.Fatal(data.WarningValidation)
os.Exit(1)
}
config.TLS = data // update warnings