code: func TLSConfig(cert *x509.Certificate, serverName string, config fab.EndpointConfig) (*tls.Config, error) {
  
  	if cert != nil {
  		config.TLSCACertPool().Add(cert)
  	}
  
  	certPool, err := config.TLSCACertPool().Get()
  	if err != nil {
  		return nil, err
  	}
  	return &tls.Config{RootCAs: certPool, Certificates: config.TLSClientCerts(), ServerName: serverName}, nil
  }
docs: // TLSConfig returns the appropriate config for TLS including the root CAs,
  // certs for mutual TLS, and server host override. Works with certs loaded either from a path or embedded pem.