Skip to content

Commit

Permalink
Add additional check for consul storage backend TLS options (#8084)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelvocks authored and briankassouf committed Jan 2, 2020
1 parent a07684e commit 3a4989c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serviceregistration/consul/consul_service_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ func setupTLSConfig(conf map[string]string, address string) (*tls.Config, error)
}

tlsClientConfig.Certificates = []tls.Certificate{tlsCert}
} else if okCert || okKey {
return nil, fmt.Errorf("both tls_cert_file and tls_key_file must be provided")
}

if tlsCaFile, ok := conf["tls_ca_file"]; ok {
Expand Down

0 comments on commit 3a4989c

Please sign in to comment.