mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
auth: different code for auth_agent
This commit is contained in:
@@ -57,6 +57,7 @@ enum ssh_pending_call_e {
|
|||||||
SSH_PENDING_CALL_AUTH_PASSWORD,
|
SSH_PENDING_CALL_AUTH_PASSWORD,
|
||||||
SSH_PENDING_CALL_AUTH_OFFER_PUBKEY,
|
SSH_PENDING_CALL_AUTH_OFFER_PUBKEY,
|
||||||
SSH_PENDING_CALL_AUTH_PUBKEY,
|
SSH_PENDING_CALL_AUTH_PUBKEY,
|
||||||
|
SSH_PENDING_CALL_AUTH_AGENT
|
||||||
};
|
};
|
||||||
|
|
||||||
/* libssh calls may block an undefined amount of time */
|
/* libssh calls may block an undefined amount of time */
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
|
|||||||
switch(session->pending_call_state) {
|
switch(session->pending_call_state) {
|
||||||
case SSH_PENDING_CALL_NONE:
|
case SSH_PENDING_CALL_NONE:
|
||||||
break;
|
break;
|
||||||
case SSH_PENDING_CALL_AUTH_PUBKEY:
|
case SSH_PENDING_CALL_AUTH_AGENT:
|
||||||
goto pending;
|
goto pending;
|
||||||
default:
|
default:
|
||||||
ssh_set_error(session,
|
ssh_set_error(session,
|
||||||
@@ -883,7 +883,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
|
|||||||
}
|
}
|
||||||
|
|
||||||
session->auth_state = SSH_AUTH_STATE_NONE;
|
session->auth_state = SSH_AUTH_STATE_NONE;
|
||||||
session->pending_call_state = SSH_PENDING_CALL_AUTH_PUBKEY;
|
session->pending_call_state = SSH_PENDING_CALL_AUTH_AGENT;
|
||||||
rc = packet_send(session);
|
rc = packet_send(session);
|
||||||
if (rc == SSH_ERROR) {
|
if (rc == SSH_ERROR) {
|
||||||
return SSH_AUTH_ERROR;
|
return SSH_AUTH_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user