fix uninitialized tlsConfig in influxdb plugin (#10899)
This commit is contained in:
parent
6ea82f6d1a
commit
820b3b1bf0
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue