From f0dc593c2f9236e9d1c68728a73af27dcd989eb6 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Fri, 2 Feb 2018 08:24:41 -0800 Subject: [PATCH] Only initialize the CA if the path is not an empty string. --- conn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn.go b/conn.go index 8064a8be..ee8d9c81 100644 --- a/conn.go +++ b/conn.go @@ -929,7 +929,7 @@ func configTLS(args configTLSArgs, cc *ConnConfig) error { return errors.New("sslmode is invalid") } - { + if args.sslRootCert != "" { caCertPool := x509.NewCertPool() caPath := args.sslRootCert