@marcel91200 / caddy Mirror · read-only / commits / d4040053
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 13:15 UTC

Quell linter (false positive)

Matthew Holt committed Apr 23, 2024 at 11:55 UTC d4040053391078eb9ee81bc1275aa6714180a4f8
1 file changed +3
caddyconfig/httploader.go
+3
@@ -181,12 +181,15 @@ func (hl HTTPLoader) makeClient(ctx caddy.Context) (*http.Client, error) {
181 if err != nil {
182 return nil, fmt.Errorf("getting server identity credentials: %v", err)
183 }
184 + // See https://github.com/securego/gosec/issues/1054#issuecomment-2072235199
185 + //nolint:gosec
186 tlsConfig = &tls.Config{Certificates: certs}
187 } else if hl.TLS.ClientCertificateFile != "" && hl.TLS.ClientCertificateKeyFile != "" {
188 cert, err := tls.LoadX509KeyPair(hl.TLS.ClientCertificateFile, hl.TLS.ClientCertificateKeyFile)
189 if err != nil {
190 return nil, err
191 }
192 + //nolint:gosec
193 tlsConfig = &tls.Config{Certificates: []tls.Certificate{cert}}
194 }
195