tls: fix CertConfigFromModule() return order

This commit is contained in:
Lars Lehtonen 2019-11-13 14:31:38 -08:00
commit 372c2d6428
No known key found for this signature in database
GPG key ID: 8137D474EBCB04F2
4 changed files with 11 additions and 11 deletions

View file

@ -213,7 +213,7 @@ func (mod *RestAPI) Configure() error {
if mod.isTLS() {
if !fs.Exists(mod.certFile) || !fs.Exists(mod.keyFile) {
err, cfg := tls.CertConfigFromModule("api.rest", mod.SessionModule)
cfg, err := tls.CertConfigFromModule("api.rest", mod.SessionModule)
if err != nil {
return err
}

View file

@ -137,7 +137,7 @@ func (mod *HttpsProxy) Configure() error {
mod.proxy.Whitelist = str.Comma(whitelist)
if !fs.Exists(certFile) || !fs.Exists(keyFile) {
err, cfg := tls.CertConfigFromModule("https.proxy", mod.SessionModule)
cfg, err := tls.CertConfigFromModule("https.proxy", mod.SessionModule)
if err != nil {
return err
}

View file

@ -129,7 +129,7 @@ func (mod *HttpsServer) Configure() error {
}
if !fs.Exists(certFile) || !fs.Exists(keyFile) {
err, cfg := tls.CertConfigFromModule("https.server", mod.SessionModule)
cfg, err := tls.CertConfigFromModule("https.server", mod.SessionModule)
if err != nil {
return err
}