aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httploader.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-04-23 11:55:37 -0600
committerMatthew Holt <[email protected]>2024-04-23 11:55:37 -0600
commitd4040053391078eb9ee81bc1275aa6714180a4f8 (patch)
treeea68d8d346011b66527649df0cba7483278bfb0f /caddyconfig/httploader.go
parent868af6a062290b82fb1d4d70697739974e814e50 (diff)
downloadcaddy-d4040053391078eb9ee81bc1275aa6714180a4f8.tar.gz
caddy-d4040053391078eb9ee81bc1275aa6714180a4f8.zip
Quell linter (false positive)
Diffstat (limited to 'caddyconfig/httploader.go')
-rw-r--r--caddyconfig/httploader.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/caddyconfig/httploader.go b/caddyconfig/httploader.go
index 528cea6c8..55fadf65b 100644
--- a/caddyconfig/httploader.go
+++ b/caddyconfig/httploader.go
@@ -181,12 +181,15 @@ func (hl HTTPLoader) makeClient(ctx caddy.Context) (*http.Client, error) {
if err != nil {
return nil, fmt.Errorf("getting server identity credentials: %v", err)
}
+ // See https://github.com/securego/gosec/issues/1054#issuecomment-2072235199
+ //nolint:gosec
tlsConfig = &tls.Config{Certificates: certs}
} else if hl.TLS.ClientCertificateFile != "" && hl.TLS.ClientCertificateKeyFile != "" {
cert, err := tls.LoadX509KeyPair(hl.TLS.ClientCertificateFile, hl.TLS.ClientCertificateKeyFile)
if err != nil {
return nil, err
}
+ //nolint:gosec
tlsConfig = &tls.Config{Certificates: []tls.Certificate{cert}}
}