Skip to content

Commit

Permalink
Quell linter (false positive)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Apr 23, 2024
1 parent 868af6a commit d404005
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caddyconfig/httploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
}

Expand Down

0 comments on commit d404005

Please sign in to comment.