code: func (c *IdentityConfig) loadCATLSConfig(configEntity *identityConfigEntity) error {
  	//CA Config
  	for ca, caConfig := range configEntity.CertificateAuthorities {
  		//resolve paths
  		caConfig.TLSCACerts.Path = pathvar.Subst(caConfig.TLSCACerts.Path)
  		caConfig.TLSCACerts.Client.Key.Path = pathvar.Subst(caConfig.TLSCACerts.Client.Key.Path)
  		caConfig.TLSCACerts.Client.Cert.Path = pathvar.Subst(caConfig.TLSCACerts.Client.Cert.Path)
  		//pre load key and cert bytes
  		err := caConfig.TLSCACerts.Client.Key.LoadBytes()
  		if err != nil {
  			return errors.WithMessage(err, "failed to load ca key")
  		}
  
  		err = caConfig.TLSCACerts.Client.Cert.LoadBytes()
  		if err != nil {
  			return errors.WithMessage(err, "failed to load ca cert")
  		}
  		configEntity.CertificateAuthorities[ca] = caConfig
  	}
  
  	return nil
  }
docs: //loadCATLSConfig pre-loads all TLSConfig bytes in certificate authorities