static BOOL nla_setup_kerberos(rdpNla* nla)
{
	SEC_WINPR_KERBEROS_SETTINGS* kerbSettings;
	rdpSettings* settings;

	WINPR_ASSERT(nla);
	WINPR_ASSERT(nla->rdpcontext);

	settings = nla->rdpcontext->settings;
	WINPR_ASSERT(settings);

	kerbSettings = nla->kerberosSettings;
	WINPR_ASSERT(kerbSettings);

	if (settings->KerberosKdcUrl)
	{
		kerbSettings->kdcUrl = _strdup(settings->KerberosKdcUrl);
		if (!kerbSettings->kdcUrl)
		{
			WLog_ERR(TAG, "unable to copy kdcUrl");
			return FALSE;
		}
	}

	if (settings->KerberosLifeTime &&
	    !parseKerberosDeltat(settings->KerberosLifeTime, &kerbSettings->lifeTime, "lifetime"))
		return FALSE;

	if (settings->KerberosStartTime &&
	    !parseKerberosDeltat(settings->KerberosStartTime, &kerbSettings->startTime, "starttime"))
		return FALSE;

	if (settings->KerberosRenewableLifeTime &&
	    !parseKerberosDeltat(settings->KerberosRenewableLifeTime, &kerbSettings->renewLifeTime,
	                         "renewLifetime"))
		return FALSE;

	if (settings->KerberosCache)
	{
		kerbSettings->cache = _strdup(settings->KerberosCache);
		if (!kerbSettings->cache)
		{
			WLog_ERR(TAG, "unable to copy cache name");
			return FALSE;
		}
	}

	if (settings->KerberosKeytab)
	{
		kerbSettings->keytab = _strdup(settings->KerberosKeytab);
		if (!kerbSettings->keytab)
		{
			WLog_ERR(TAG, "unable to copy keytab name");
			return FALSE;
		}
	}

	if (settings->KerberosArmor)
	{
		kerbSettings->armorCache = _strdup(settings->KerberosArmor);
		if (!kerbSettings->armorCache)
		{
			WLog_ERR(TAG, "unable to copy armorCache");
			return FALSE;
		}
	}

	return TRUE;
}
static BOOL nla_setup_kerberos(rdpNla* nla)
{
	SEC_WINPR_KERBEROS_SETTINGS* kerbSettings;
	rdpSettings* settings;

	WINPR_ASSERT(nla);
	WINPR_ASSERT(nla->rdpcontext);

	settings = nla->rdpcontext->settings;
	WINPR_ASSERT(settings);

	kerbSettings = nla->kerberosSettings;
	WINPR_ASSERT(kerbSettings);

	if (settings->KerberosKdcUrl)
	{
		kerbSettings->kdcUrl = _strdup(settings->KerberosKdcUrl);
		if (!kerbSettings->kdcUrl)
		{
			WLog_ERR(TAG, "unable to copy kdcUrl");
			return FALSE;
		}
	}

	if (settings->KerberosLifeTime &&
	    !parseKerberosDeltat(settings->KerberosLifeTime, &kerbSettings->lifeTime, "lifetime"))
		return FALSE;

	if (settings->KerberosStartTime &&
	    !parseKerberosDeltat(settings->KerberosStartTime, &kerbSettings->startTime, "starttime"))
		return FALSE;

	if (settings->KerberosRenewableLifeTime &&
	    !parseKerberosDeltat(settings->KerberosRenewableLifeTime, &kerbSettings->renewLifeTime,
	                         "renewLifetime"))
		return FALSE;

	if (settings->KerberosCache)
	{
		kerbSettings->cache = _strdup(settings->KerberosCache);
		if (!kerbSettings->cache)
		{
			WLog_ERR(TAG, "unable to copy cache name");
			return FALSE;
		}
	}

	if (settings->KerberosKeytab)
	{
		kerbSettings->keytab = _strdup(settings->KerberosKeytab);
		if (!kerbSettings->keytab)
		{
			WLog_ERR(TAG, "unable to copy keytab name");
			return FALSE;
		}
	}

	if (settings->KerberosArmor)
	{
		kerbSettings->armorCache = _strdup(settings->KerberosArmor);
		if (!kerbSettings->armorCache)
		{
			WLog_ERR(TAG, "unable to copy armorCache");
			return FALSE;
		}
	}

	return TRUE;
}