func CreateTLSConfig(prefix string) (*tls.Config, error) {
	caFile := os.Getenv(fmt.Sprintf("%s_CA_FILE", prefix))
	certFile := os.Getenv(fmt.Sprintf("%s_CERT_FILE", prefix))
	keyFile := os.Getenv(fmt.Sprintf("%s_KEY_FILE", prefix))
	serverName := os.Getenv(fmt.Sprintf("%s_TLS_SERVER_NAME", prefix))
	isInsecureStr := strings.ToLower(os.Getenv(fmt.Sprintf("%s_TLS_INSECURE", prefix)))
	isInsecure := isInsecureStr == "true" || isInsecureStr == "yes" || isInsecureStr == "1"
	tlsConfig, err := NewTLSConfig(certFile, keyFile, caFile, serverName, isInsecure, defaultMinVersion)
	if err != nil {
		return nil, err
	}
	return tlsConfig, nil
}
func CreateTLSConfig(prefix string) (*tls.Config, error) {
	caFile := os.Getenv(fmt.Sprintf("%s_CA_FILE", prefix))
	certFile := os.Getenv(fmt.Sprintf("%s_CERT_FILE", prefix))
	keyFile := os.Getenv(fmt.Sprintf("%s_KEY_FILE", prefix))
	serverName := os.Getenv(fmt.Sprintf("%s_TLS_SERVER_NAME", prefix))
	isInsecureStr := strings.ToLower(os.Getenv(fmt.Sprintf("%s_TLS_INSECURE", prefix)))
	isInsecure := isInsecureStr == "true" || isInsecureStr == "yes" || isInsecureStr == "1"
	tlsConfig, err := NewTLSConfig(certFile, keyFile, caFile, serverName, isInsecure, defaultMinVersion)
	if err != nil {
		return nil, err
	}
	return tlsConfig, nil
}
func CreateTLSConfig ( prefix string ) ( * tls . Config , error ) { caFile := os . Getenv ( fmt . Sprintf ( " " , prefix ) ) certFile := os . Getenv ( fmt . Sprintf ( " " , prefix ) ) keyFile := os . Getenv ( fmt . Sprintf ( " " , prefix ) ) serverName := os . Getenv ( fmt . Sprintf ( " " , prefix ) ) isInsecureStr := strings . ToLower ( os . Getenv ( fmt . Sprintf ( " " , prefix ) ) ) isInsecure := isInsecureStr == " " || isInsecureStr == " " || isInsecureStr == " " tlsConfig , err := NewTLSConfig ( certFile , keyFile , caFile , serverName , isInsecure , defaultMinVersion ) if err != nil { return nil , err } return tlsConfig , nil }
// CreateTLSConfig creates tls.Config instance from TLS parameters passed in environment variables with the given prefix
CreateTLSConfig creates tls . Config instance from TLS parameters passed in environment variables with the given prefix