Commit 6b180343 authored by Marc Bärtschi's avatar Marc Bärtschi

fix build error

parent bd6410ea
......@@ -7,11 +7,11 @@ import (
"log"
"os"
"os/signal"
"path/filepath"
"time"
pb "git.dolansoft.org/marc/dns/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
var apiClient pb.DnsClient
......@@ -21,14 +21,14 @@ func main() {
// TODO: add Log
// TODO: make configurable / flags
certificate, err := tls.LoadX509KeyPair(filepath.Join(homedir, "/sec/tls.crt"), filepath.Join(homedir, "/sec/tls.key"))
certificate, err := tls.LoadX509KeyPair("/sec/tls.crt", "/sec/tls.key")
if err != nil {
log.Fatalf("could not load client key pair: %s", err)
}
// Create a certificate pool from the certificate authority
certPool := x509.NewCertPool()
ca, err := ioutil.ReadFile(filepath.Join(homedir, "/sec/ca.pem"))
ca, err := ioutil.ReadFile("/sec/ca.pem")
if err != nil {
log.Fatalf("could not read ca certificate: %s", err)
}
......@@ -47,8 +47,8 @@ func main() {
// GRPC Backend Service
// Open a Connection
var clientConn *grpc.ClientConn
clientConn, err := grpc.Dial("212.51.131.33:8520", grpc.WithTransportCredentials(creds))
)
clientConn, err = grpc.Dial("212.51.131.33:8520", grpc.WithTransportCredentials(creds))
if err != nil {
log.Fatalf("did not connect: %s", err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment