mirror of
https://github.com/kingToolbox/WindTerm.git
synced 2025-03-22 10:50:07 +08:00
Fix support for pageant in libssh.
This commit is contained in:
parent
95c30ebc9c
commit
ee1a5ca4ae
@ -722,7 +722,6 @@ fail:
|
|||||||
return SSH_AUTH_ERROR;
|
return SSH_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
static int ssh_userauth_agent_publickey(ssh_session session,
|
static int ssh_userauth_agent_publickey(ssh_session session,
|
||||||
const char *username,
|
const char *username,
|
||||||
ssh_key pubkey)
|
ssh_key pubkey)
|
||||||
@ -959,7 +958,6 @@ int ssh_userauth_agent(ssh_session session,
|
|||||||
session->agent_state = NULL;
|
session->agent_state = NULL;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
enum ssh_auth_auto_state_e {
|
enum ssh_auth_auto_state_e {
|
||||||
SSH_AUTH_AUTO_STATE_NONE = 0,
|
SSH_AUTH_AUTO_STATE_NONE = 0,
|
||||||
@ -1037,7 +1035,6 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
|||||||
}
|
}
|
||||||
state = session->auth.auto_state;
|
state = session->auth.auto_state;
|
||||||
if (state->state == SSH_AUTH_AUTO_STATE_NONE) {
|
if (state->state == SSH_AUTH_AUTO_STATE_NONE) {
|
||||||
#ifndef _WIN32
|
|
||||||
/* Try authentication with ssh-agent first */
|
/* Try authentication with ssh-agent first */
|
||||||
rc = ssh_userauth_agent(session, username);
|
rc = ssh_userauth_agent(session, username);
|
||||||
if (rc == SSH_AUTH_SUCCESS ||
|
if (rc == SSH_AUTH_SUCCESS ||
|
||||||
@ -1045,7 +1042,6 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
|||||||
rc == SSH_AUTH_AGAIN ) {
|
rc == SSH_AUTH_AGAIN ) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
state->state = SSH_AUTH_AUTO_STATE_PUBKEY;
|
state->state = SSH_AUTH_AUTO_STATE_PUBKEY;
|
||||||
}
|
}
|
||||||
if (state->it == NULL) {
|
if (state->it == NULL) {
|
||||||
@ -1295,7 +1291,6 @@ fail:
|
|||||||
return SSH_AUTH_ERROR;
|
return SSH_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
/* LEGACY */
|
/* LEGACY */
|
||||||
int ssh_userauth_agent_pubkey(ssh_session session,
|
int ssh_userauth_agent_pubkey(ssh_session session,
|
||||||
const char *username,
|
const char *username,
|
||||||
@ -1323,7 +1318,6 @@ int ssh_userauth_agent_pubkey(ssh_session session,
|
|||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
ssh_kbdint ssh_kbdint_new(void) {
|
ssh_kbdint ssh_kbdint_new(void) {
|
||||||
ssh_kbdint kbd;
|
ssh_kbdint kbd;
|
||||||
|
Loading…
Reference in New Issue
Block a user