+func loadCaCerts(caCertsPath string) *x509.CertPool {
+ var err error
+ if caCertsPath == "" {
+ return nil
+ }
+ caCert, err := ioutil.ReadFile(caCertsPath)
+ check(err)
+ caCertPool := x509.NewCertPool()
+ caCertPool.AppendCertsFromPEM(caCert)
+ return caCertPool
+}
+