peer TLS updates

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2019-10-08 02:22:15 -04:00
parent 6edfb4d93f
commit 1e9e515e65
No known key found for this signature in database
GPG Key ID: A519480096146526
1 changed files with 0 additions and 3 deletions

View File

@ -28,7 +28,6 @@ import (
"net/url"
"time"
"github.com/sirupsen/logrus"
"github.com/stellarproject/heimdall"
v1 "github.com/stellarproject/heimdall/api/v1"
"google.golang.org/grpc"
@ -102,10 +101,8 @@ func (c *Client) Close() error {
func DialOptionsFromConfig(cfg *heimdall.Config) ([]grpc.DialOption, error) {
opts := []grpc.DialOption{}
if cfg.TLSClientCertificate != "" {
logrus.WithField("cert", cfg.TLSClientCertificate).Debug("configuring TLS cert")
var creds credentials.TransportCredentials
if cfg.TLSClientKey != "" {
logrus.WithField("key", cfg.TLSClientKey).Debug("configuring TLS key")
cert, err := tls.LoadX509KeyPair(cfg.TLSClientCertificate, cfg.TLSClientKey)
if err != nil {
return nil, err