static SECURITY_STATUS nla_decrypt_ts_credentials(rdpNla* nla)
{
	SECURITY_STATUS status;

	WINPR_ASSERT(nla);

	if (nla->authInfo.cbBuffer < 1)
	{
		WLog_ERR(TAG, "nla_decrypt_ts_credentials missing authInfo buffer");
		return SEC_E_INVALID_TOKEN;
	}

	status = nla_decrypt(nla, &nla->authInfo, nla->ContextSizes.cbSecurityTrailer);
	if (status != SEC_E_OK)
		return status;

	if (!nla_read_ts_credentials(nla, &nla->authInfo, nla->ContextSizes.cbSecurityTrailer))
		return SEC_E_INSUFFICIENT_MEMORY;

	return SEC_E_OK;
}
static SECURITY_STATUS nla_decrypt_ts_credentials(rdpNla* nla)
{
	SECURITY_STATUS status;

	WINPR_ASSERT(nla);

	if (nla->authInfo.cbBuffer < 1)
	{
		WLog_ERR(TAG, "nla_decrypt_ts_credentials missing authInfo buffer");
		return SEC_E_INVALID_TOKEN;
	}

	status = nla_decrypt(nla, &nla->authInfo, nla->ContextSizes.cbSecurityTrailer);
	if (status != SEC_E_OK)
		return status;

	if (!nla_read_ts_credentials(nla, &nla->authInfo, nla->ContextSizes.cbSecurityTrailer))
		return SEC_E_INSUFFICIENT_MEMORY;

	return SEC_E_OK;
}