* validateCertificates(): change input parameters; added short description

This commit is contained in:
Simon Zolin
2019-02-27 14:11:41 +03:00
parent d218e047a3
commit 766fbab071
3 changed files with 25 additions and 26 deletions

4
app.go
View File

@@ -178,13 +178,13 @@ 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 := validateCertificates(config.TLS)
data := validateCertificates(config.TLS.CertificateChain, config.TLS.PrivateKey, config.TLS.ServerName)
if !data.usable {
log.Fatal(data.WarningValidation)
os.Exit(1)
}
config.Lock()
config.TLS = data // update warnings
config.TLS.tlsConfigStatus = data // update warnings
config.Unlock()
// prepare certs for HTTPS server