_lasso_login_must_sign(LassoProfile *profile)
{
	gboolean ret;
	LassoProvider *remote_provider;

	remote_provider = lasso_server_get_provider(profile->server,
			profile->remote_providerID);

	switch (lasso_profile_get_signature_hint(profile)) {
		case LASSO_PROFILE_SIGNATURE_HINT_MAYBE:
			/* If our metadatas say that we sign, then we sign,
			 * If the IdP says that he wants our signature, then we sign
			 * Otherwise we do not.
			 */
			ret = authn_request_signed(&profile->server->parent)
				|| want_authn_request_signed(remote_provider);
			return ret;
		case LASSO_PROFILE_SIGNATURE_HINT_FORCE:
			return TRUE;
		case LASSO_PROFILE_SIGNATURE_HINT_FORBID:
			return FALSE;
	}
	g_assert(0);
	return TRUE;
}
_lasso_login_must_sign(LassoProfile *profile)
{
	gboolean ret;
	LassoProvider *remote_provider;

	remote_provider = lasso_server_get_provider(profile->server,
			profile->remote_providerID);

	switch (lasso_profile_get_signature_hint(profile)) {
		case LASSO_PROFILE_SIGNATURE_HINT_MAYBE:
			 
			ret = authn_request_signed(&profile->server->parent)
				|| want_authn_request_signed(remote_provider);
			return ret;
		case LASSO_PROFILE_SIGNATURE_HINT_FORCE:
			return TRUE;
		case LASSO_PROFILE_SIGNATURE_HINT_FORBID:
			return FALSE;
	}
	g_assert(0);
	return TRUE;
}