peer TLS updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
6edfb4d93f
commit
1e9e515e65
1 changed files with 0 additions and 3 deletions
|
@ -28,7 +28,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"github.com/stellarproject/heimdall"
|
"github.com/stellarproject/heimdall"
|
||||||
v1 "github.com/stellarproject/heimdall/api/v1"
|
v1 "github.com/stellarproject/heimdall/api/v1"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
@ -102,10 +101,8 @@ func (c *Client) Close() error {
|
||||||
func DialOptionsFromConfig(cfg *heimdall.Config) ([]grpc.DialOption, error) {
|
func DialOptionsFromConfig(cfg *heimdall.Config) ([]grpc.DialOption, error) {
|
||||||
opts := []grpc.DialOption{}
|
opts := []grpc.DialOption{}
|
||||||
if cfg.TLSClientCertificate != "" {
|
if cfg.TLSClientCertificate != "" {
|
||||||
logrus.WithField("cert", cfg.TLSClientCertificate).Debug("configuring TLS cert")
|
|
||||||
var creds credentials.TransportCredentials
|
var creds credentials.TransportCredentials
|
||||||
if cfg.TLSClientKey != "" {
|
if cfg.TLSClientKey != "" {
|
||||||
logrus.WithField("key", cfg.TLSClientKey).Debug("configuring TLS key")
|
|
||||||
cert, err := tls.LoadX509KeyPair(cfg.TLSClientCertificate, cfg.TLSClientKey)
|
cert, err := tls.LoadX509KeyPair(cfg.TLSClientCertificate, cfg.TLSClientKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue