version 1.302, 2019/02/11 09:44:42 |
version 1.303, 2019/02/12 23:53:10 |
|
|
|
|
static int userauth_none(struct ssh *); |
static int userauth_none(struct ssh *); |
static int userauth_pubkey(struct ssh *); |
static int userauth_pubkey(struct ssh *); |
static void userauth_pubkey_cleanup(struct ssh *); |
|
static int userauth_passwd(struct ssh *); |
static int userauth_passwd(struct ssh *); |
static int userauth_kbdint(struct ssh *); |
static int userauth_kbdint(struct ssh *); |
static int userauth_hostbased(struct ssh *); |
static int userauth_hostbased(struct ssh *); |
|
|
|
|
void userauth(struct ssh *, char *); |
void userauth(struct ssh *, char *); |
|
|
|
static void pubkey_cleanup(struct ssh *); |
static int sign_and_send_pubkey(struct ssh *ssh, Identity *); |
static int sign_and_send_pubkey(struct ssh *ssh, Identity *); |
static void pubkey_prepare(Authctxt *); |
static void pubkey_prepare(Authctxt *); |
static void pubkey_reset(Authctxt *); |
static void pubkey_reset(Authctxt *); |
|
|
NULL}, |
NULL}, |
{"publickey", |
{"publickey", |
userauth_pubkey, |
userauth_pubkey, |
userauth_pubkey_cleanup, |
NULL, |
&options.pubkey_authentication, |
&options.pubkey_authentication, |
NULL}, |
NULL}, |
{"keyboard-interactive", |
{"keyboard-interactive", |
|
|
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info); |
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info); |
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); |
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); |
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ |
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ |
|
pubkey_cleanup(ssh); |
ssh->authctxt = NULL; |
ssh->authctxt = NULL; |
|
|
ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); |
ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); |
|
|
} |
} |
|
|
static void |
static void |
userauth_pubkey_cleanup(struct ssh *ssh) |
pubkey_cleanup(struct ssh *ssh) |
{ |
{ |
Authctxt *authctxt = (Authctxt *)ssh->authctxt; |
Authctxt *authctxt = (Authctxt *)ssh->authctxt; |
|
|
Identity *id; |
Identity *id; |
|
|
if (authctxt->agent_fd != -1) { |
if (authctxt->agent_fd != -1) { |