From 782548e4af3dda0581407188869e21d2422094f6 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 17 Oct 2023 17:21:37 +0530 Subject: [PATCH] Use reference variable while reading certificates --- cmd/serve.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/serve.go b/cmd/serve.go index 0d001e06..89d98c0a 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -116,15 +116,15 @@ func serve() { tlsCertFilepath := "" tlsKeyFilepath := "" - var cert tls.Certificate + var cert *tls.Certificate if tlsCertFilepath != "" && tlsKeyFilepath != "" { - cert, err = tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath) + *cert, err = tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath) if err != nil { logWithCommand.Fatal(err) } } - nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort) + nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, cert, rpcPort) if err != nil { logWithCommand.Fatal(err) }