Lines Matching refs:ssh
54 static int auth2_challenge_start(struct ssh *);
55 static int send_userauth_info_request(struct ssh *);
56 static int input_userauth_info_response(int, u_int32_t, struct ssh *);
202 auth2_challenge(struct ssh *ssh, char *devs) in auth2_challenge() argument
204 Authctxt *authctxt = ssh->authctxt; in auth2_challenge()
213 return auth2_challenge_start(ssh); in auth2_challenge()
218 auth2_challenge_stop(struct ssh *ssh) in auth2_challenge_stop() argument
220 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_stop()
222 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); in auth2_challenge_stop()
231 auth2_challenge_start(struct ssh *ssh) in auth2_challenge_start() argument
233 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_start()
240 auth2_challenge_stop(ssh); in auth2_challenge_start()
247 auth2_challenge_stop(ssh); in auth2_challenge_start()
250 if (send_userauth_info_request(ssh) == 0) { in auth2_challenge_start()
251 auth2_challenge_stop(ssh); in auth2_challenge_start()
254 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, in auth2_challenge_start()
262 send_userauth_info_request(struct ssh *ssh) in send_userauth_info_request() argument
264 Authctxt *authctxt = ssh->authctxt; in send_userauth_info_request()
275 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST)) != 0 || in send_userauth_info_request()
276 (r = sshpkt_put_cstring(ssh, name)) != 0 || in send_userauth_info_request()
277 (r = sshpkt_put_cstring(ssh, instr)) != 0 || in send_userauth_info_request()
278 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language not used */ in send_userauth_info_request()
279 (r = sshpkt_put_u32(ssh, kbdintctxt->nreq)) != 0) in send_userauth_info_request()
282 if ((r = sshpkt_put_cstring(ssh, prompts[i])) != 0 || in send_userauth_info_request()
283 (r = sshpkt_put_u8(ssh, echo_on[i])) != 0) in send_userauth_info_request()
286 if ((r = sshpkt_send(ssh)) != 0 || in send_userauth_info_request()
287 (r = ssh_packet_write_wait(ssh)) < 0) in send_userauth_info_request()
300 input_userauth_info_response(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_response() argument
302 Authctxt *authctxt = ssh->authctxt; in input_userauth_info_response()
319 if ((r = sshpkt_get_u32(ssh, &nresp)) != 0) in input_userauth_info_response()
328 if ((r = sshpkt_get_cstring(ssh, &response[i], NULL)) != 0) in input_userauth_info_response()
332 if ((r = sshpkt_get_end(ssh)) != 0) in input_userauth_info_response()
350 if (send_userauth_info_request(ssh) == 1) in input_userauth_info_response()
360 auth2_challenge_stop(ssh); in input_userauth_info_response()
364 auth2_challenge_start(ssh); in input_userauth_info_response()
367 userauth_finish(ssh, authenticated, "keyboard-interactive", in input_userauth_info_response()