code: func (a *Adaptor) newTLSConfig() *tls.Config {
  	// Import server certificate
  	var certpool *x509.CertPool
  	if len(a.ServerCert()) > 0 {
  		certpool = x509.NewCertPool()
  		pemCerts, err := ioutil.ReadFile(a.ServerCert())
  		if err == nil {
  			certpool.AppendCertsFromPEM(pemCerts)
  		}
  	}
  
  	// Import client certificate/key pair
  	var certs []tls.Certificate
  	if len(a.ClientCert()) > 0 && len(a.ClientKey()) > 0 {
  		cert, err := tls.LoadX509KeyPair(a.ClientCert(), a.ClientKey())
  		if err != nil {
  			// TODO: proper error handling
  			panic(err)
  		}
  		certs = append(certs, cert)
  	}
  
  	// Create tls.Config with desired tls properties
  	return &tls.Config{
  		// RootCAs = certs used to verify server cert.
  		RootCAs: certpool,
  		// ClientAuth = whether to request cert from server.
  		// Since the server is set up for SSL, this happens
  		// anyways.
  		ClientAuth: tls.NoClientCert,
  		// ClientCAs = certs used to validate client cert.
  		ClientCAs: nil,
  		// InsecureSkipVerify = verify that cert contents
  		// match server. IP matches what is in cert etc.
  		InsecureSkipVerify: true,
  		// Certificates = list of certs client sends to server.
  		Certificates: certs,
  	}
  }
docs: // newTLSConfig sets the TLS config in the case that we are using
  // an MQTT broker with TLS