Skip to content

Commit

Permalink
fix uninitialized tlsConfig in influxdb plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jleinfors authored and Johan Leinfors committed Feb 11, 2021
1 parent 20e6967 commit 388757d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/database/influxdb/connection_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (i *influxdbConnectionProducer) createClient() (influx.Client, error) {
}

if i.TLS {
var tlsConfig *tls.Config
tlsConfig := &tls.Config{}
if len(i.certificate) > 0 || len(i.issuingCA) > 0 {
if len(i.certificate) > 0 && len(i.privateKey) == 0 {
return nil, fmt.Errorf("found certificate for TLS authentication but no private key")
Expand Down

0 comments on commit 388757d

Please sign in to comment.