Lines Matching refs:ssh
45 static int auth2_challenge_start(struct ssh *);
46 static int send_userauth_info_request(struct ssh *);
47 static int input_userauth_info_response(int, u_int32_t, struct ssh *);
154 auth2_challenge(struct ssh *ssh, char *devs) in auth2_challenge() argument
156 Authctxt *authctxt = ssh->authctxt; in auth2_challenge()
165 return auth2_challenge_start(ssh); in auth2_challenge()
170 auth2_challenge_stop(struct ssh *ssh) in auth2_challenge_stop() argument
172 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_stop()
174 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); in auth2_challenge_stop()
183 auth2_challenge_start(struct ssh *ssh) in auth2_challenge_start() argument
185 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_start()
192 auth2_challenge_stop(ssh); in auth2_challenge_start()
199 auth2_challenge_stop(ssh); in auth2_challenge_start()
202 if (send_userauth_info_request(ssh) == 0) { in auth2_challenge_start()
203 auth2_challenge_stop(ssh); in auth2_challenge_start()
206 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, in auth2_challenge_start()
214 send_userauth_info_request(struct ssh *ssh) in send_userauth_info_request() argument
216 Authctxt *authctxt = ssh->authctxt; in send_userauth_info_request()
226 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST)) != 0 || in send_userauth_info_request()
227 (r = sshpkt_put_cstring(ssh, name)) != 0 || in send_userauth_info_request()
228 (r = sshpkt_put_cstring(ssh, instr)) != 0 || in send_userauth_info_request()
229 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language not used */ in send_userauth_info_request()
230 (r = sshpkt_put_u32(ssh, kbdintctxt->nreq)) != 0) in send_userauth_info_request()
233 if ((r = sshpkt_put_cstring(ssh, prompts[i])) != 0 || in send_userauth_info_request()
234 (r = sshpkt_put_u8(ssh, echo_on[i])) != 0) in send_userauth_info_request()
237 if ((r = sshpkt_send(ssh)) != 0 || in send_userauth_info_request()
238 (r = ssh_packet_write_wait(ssh)) != 0) in send_userauth_info_request()
251 input_userauth_info_response(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_response() argument
253 Authctxt *authctxt = ssh->authctxt; in input_userauth_info_response()
270 if ((r = sshpkt_get_u32(ssh, &nresp)) != 0) in input_userauth_info_response()
279 if ((r = sshpkt_get_cstring(ssh, &response[i], NULL)) != 0) in input_userauth_info_response()
283 if ((r = sshpkt_get_end(ssh)) != 0) in input_userauth_info_response()
301 if (send_userauth_info_request(ssh) == 1) in input_userauth_info_response()
311 auth2_challenge_stop(ssh); in input_userauth_info_response()
315 auth2_challenge_start(ssh); in input_userauth_info_response()
318 userauth_finish(ssh, authenticated, "keyboard-interactive", in input_userauth_info_response()