Commit 209a2d22 authored by Antenore Gatta's avatar Antenore Gatta

Better error handling

parent 4ca341ba
......@@ -239,13 +239,25 @@ static gint
remmina_ssh_auth_auto_pubkey (RemminaSSH* ssh)
{
TRACE_CALL("remmina_ssh_auth_auto_pubkey");
gint ret;
ret = ssh_userauth_autopubkey (ssh->session, "");
gint ret = ssh_userauth_autopubkey (ssh->session, NULL);
if(ret == SSH_AUTH_ERROR)
{
remmina_ssh_set_error (ssh, _("[SSH] automatic public key authentication failed: %s"));
return ret;
}
if (ret != SSH_AUTH_SUCCESS)
{
remmina_ssh_set_error (ssh, _("SSH automatic public key authentication failed: %s"));
return 0;
remmina_ssh_set_error (ssh, _("[SSH] automatic public key authentication failed: %s"));
return ret;
}
if (ret != SSH_AUTH_PARTIAL)
{
remmina_ssh_set_error (ssh, _("[SSH] automatic public key authentication partially failed: %s"));
/* We should call remmina_ssh_auth_gui */
return ret;
}
ssh->authenticated = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment