save returned certs/keys

This commit is contained in:
Matthew R. Kasun
2022-04-15 16:07:19 -04:00
parent 08e219cdcc
commit 4f19beda00
2 changed files with 5 additions and 2 deletions

View File

@@ -308,7 +308,7 @@ func NewTLSConfig(cfg *config.ClientConfig, server string) *tls.Config {
logger.Log(0, "VerifyConnection - certifiate mismatch")
return errors.New("certificate doesn't match server")
}
ca, err := ssl.ReadCert("/etc/netclient/" + cs.ServerName + "/server.pem")
ca, err := ssl.ReadCert("/etc/netclient/" + cs.ServerName + "/root.pem")
if err != nil {
logger.Log(0, "VerifyConnection - unable to read ca", err.Error())
return errors.New("unable to read ca")