code: func genCertPair(certFile, keyFile string) error {
  	rpcsLog.Infof("Generating TLS certificates...")
  
  	org := "btcd autogenerated cert"
  	validUntil := time.Now().Add(10 * 365 * 24 * time.Hour)
  	cert, key, err := btcutil.NewTLSCertPair(org, validUntil, nil)
  	if err != nil {
  		return err
  	}
  
  	// Write cert and key files.
  	if err = ioutil.WriteFile(certFile, cert, 0666); err != nil {
  		return err
  	}
  	if err = ioutil.WriteFile(keyFile, key, 0600); err != nil {
  		os.Remove(certFile)
  		return err
  	}
  
  	rpcsLog.Infof("Done generating TLS certificates")
  	return nil
  }
docs: // genCertPair generates a key/cert pair to the paths provided.