code: func (i *initCmd) tlsOptions() error {
  	i.opts.EnableTLS = tlsEnable || tlsVerify
  	i.opts.VerifyTLS = tlsVerify
  
  	if i.opts.EnableTLS {
  		missing := func(file string) bool {
  			_, err := os.Stat(file)
  			return os.IsNotExist(err)
  		}
  		if i.opts.TLSKeyFile = tlsKeyFile; i.opts.TLSKeyFile == "" || missing(i.opts.TLSKeyFile) {
  			return errors.New("missing required TLS key file")
  		}
  		if i.opts.TLSCertFile = tlsCertFile; i.opts.TLSCertFile == "" || missing(i.opts.TLSCertFile) {
  			return errors.New("missing required TLS certificate file")
  		}
  		if i.opts.VerifyTLS {
  			if i.opts.TLSCaCertFile = tlsCaCertFile; i.opts.TLSCaCertFile == "" || missing(i.opts.TLSCaCertFile) {
  				return errors.New("missing required TLS CA file")
  			}
  		}
  
  		// FIXME: remove once we use pkg/helm/environment.AddFlagsTLS() in Helm 3
  		settings.TLSEnable = tlsEnable
  		settings.TLSVerify = tlsVerify
  		settings.TLSServerName = tlsServerName
  		settings.TLSCaCertFile = tlsCaCertFile
  		settings.TLSCertFile = tlsCertFile
  		settings.TLSKeyFile = tlsKeyFile
  	}
  	return nil
  }
docs: // tlsOptions sanitizes the tls flags as well as checks for the existence of required
  // tls files indicated by those flags, if any.