Add skip verify on the client for now

This commit is contained in:
Marc Di Luzio 2020-07-26 23:30:09 +01:00
parent 4821a90143
commit 9b03ffb7f1

View file

@ -1,6 +1,7 @@
package main
import (
"crypto/tls"
"encoding/json"
"fmt"
"io/ioutil"
@ -16,6 +17,7 @@ import (
"github.com/mdiluz/rove/proto/roveapi"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
var home = os.Getenv("HOME")
@ -185,8 +187,12 @@ func InnerMain(command string, args ...string) error {
return fmt.Errorf("no host set in %s, set one with '%s config {HOST}'", ConfigPath(), os.Args[0])
}
tls := &tls.Config{
InsecureSkipVerify: true,
}
// Set up the server
clientConn, err := grpc.Dial(fmt.Sprintf("%s:%d", config.Host, gRPCport), grpc.WithInsecure())
clientConn, err := grpc.Dial(fmt.Sprintf("%s:%d", config.Host, gRPCport), grpc.WithTransportCredentials(credentials.NewTLS(tls)))
if err != nil {
return err
}