From 537cd35cb2a408da9354c85d88fc03b6398c0792 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 25 Jan 2022 22:22:15 +0000 Subject: [PATCH] Try to add the grpc cert correctly --- app.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 61d67ade..08815889 100644 --- a/app.go +++ b/app.go @@ -572,7 +572,11 @@ func (h *Headscale) Serve() error { if tlsConfig != nil { httpServer.TLSConfig = tlsConfig - grpcOptions = append(grpcOptions, grpc.Creds(credentials.NewTLS(tlsConfig))) + // grpcOptions = append(grpcOptions, grpc.Creds(credentials.NewTLS(tlsConfig))) + grpcOptions = append( + grpcOptions, + grpc.Creds(credentials.NewServerTLSFromCert(&tlsConfig.Certificates[0])), + ) } grpcServer := grpc.NewServer(grpcOptions...)