Lines Matching refs:ssh
94 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh) in verify_host_key_callback() argument
218 ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port, in ssh_kex2() argument
230 ssh_packet_set_rekey_limits(ssh, options.rekey_limit, in ssh_kex2()
253 kex_proposal_populate_entries(ssh, myproposal, in ssh_kex2()
261 if ((r = kex_setup(ssh, myproposal)) != 0) in ssh_kex2()
264 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; in ssh_kex2()
265 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; in ssh_kex2()
266 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; in ssh_kex2()
267 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; in ssh_kex2()
268 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client; in ssh_kex2()
269 ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; in ssh_kex2()
270 ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; in ssh_kex2()
272 ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client; in ssh_kex2()
275 ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client; in ssh_kex2()
276 ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client; in ssh_kex2()
277 ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client; in ssh_kex2()
278 ssh->kex->verify_host_key=&verify_host_key_callback; in ssh_kex2()
280 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done); in ssh_kex2()
285 if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 || in ssh_kex2()
286 (r = sshpkt_put_cstring(ssh, "markus")) != 0 || in ssh_kex2()
287 (r = sshpkt_send(ssh)) != 0 || in ssh_kex2()
288 (r = ssh_packet_write_wait(ssh)) != 0) in ssh_kex2()
344 int (*userauth)(struct ssh *ssh);
345 void (*cleanup)(struct ssh *ssh);
350 static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
351 static int input_userauth_success(int, u_int32_t, struct ssh *);
352 static int input_userauth_failure(int, u_int32_t, struct ssh *);
353 static int input_userauth_banner(int, u_int32_t, struct ssh *);
354 static int input_userauth_error(int, u_int32_t, struct ssh *);
355 static int input_userauth_info_req(int, u_int32_t, struct ssh *);
356 static int input_userauth_pk_ok(int, u_int32_t, struct ssh *);
357 static int input_userauth_passwd_changereq(int, u_int32_t, struct ssh *);
359 static int userauth_none(struct ssh *);
360 static int userauth_pubkey(struct ssh *);
361 static int userauth_passwd(struct ssh *);
362 static int userauth_kbdint(struct ssh *);
363 static int userauth_hostbased(struct ssh *);
366 static int userauth_gssapi(struct ssh *);
367 static void userauth_gssapi_cleanup(struct ssh *);
368 static int input_gssapi_response(int type, u_int32_t, struct ssh *);
369 static int input_gssapi_token(int type, u_int32_t, struct ssh *);
370 static int input_gssapi_error(int, u_int32_t, struct ssh *);
371 static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
374 void userauth(struct ssh *, char *);
376 static void pubkey_cleanup(struct ssh *);
377 static int sign_and_send_pubkey(struct ssh *ssh, Identity *);
378 static void pubkey_prepare(struct ssh *, Authctxt *);
423 ssh_userauth2(struct ssh *ssh, const char *local_user, in ssh_userauth2() argument
455 if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_REQUEST)) != 0 || in ssh_userauth2()
456 (r = sshpkt_put_cstring(ssh, "ssh-userauth")) != 0 || in ssh_userauth2()
457 (r = sshpkt_send(ssh)) != 0) in ssh_userauth2()
460 ssh->authctxt = &authctxt; in ssh_userauth2()
461 ssh_dispatch_init(ssh, &input_userauth_error); in ssh_userauth2()
462 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info); in ssh_userauth2()
463 ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); in ssh_userauth2()
464 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ in ssh_userauth2()
465 pubkey_cleanup(ssh); in ssh_userauth2()
474 ssh->authctxt = NULL; in ssh_userauth2()
476 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); in ssh_userauth2()
480 if (ssh_packet_connection_is_on_socket(ssh)) { in ssh_userauth2()
482 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), in ssh_userauth2()
491 input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_service_accept() argument
495 if (ssh_packet_remaining(ssh) > 0) { in input_userauth_service_accept()
498 if ((r = sshpkt_get_cstring(ssh, &reply, NULL)) != 0) in input_userauth_service_accept()
505 if ((r = sshpkt_get_end(ssh)) != 0) in input_userauth_service_accept()
510 userauth_none(ssh); in input_userauth_service_accept()
513 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, ssh->kex->ext_info_s ? in input_userauth_service_accept()
515 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success); in input_userauth_service_accept()
516 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure); in input_userauth_service_accept()
517 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner); in input_userauth_service_accept()
524 userauth(struct ssh *ssh, char *authlist) in userauth() argument
526 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth()
529 authctxt->method->cleanup(ssh); in userauth()
547 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_PER_METHOD_MIN, in userauth()
551 if (method->userauth(ssh) != 0) { in userauth()
562 input_userauth_error(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_error() argument
569 input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_banner() argument
576 if ((r = sshpkt_get_cstring(ssh, &msg, &len)) != 0 || in input_userauth_banner()
577 (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) in input_userauth_banner()
588 input_userauth_success(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_success() argument
590 Authctxt *authctxt = ssh->authctxt; in input_userauth_success()
597 authctxt->method->cleanup(ssh); in input_userauth_success()
601 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error); in input_userauth_success()
607 input_userauth_success_unexpected(int type, u_int32_t seq, struct ssh *ssh)
609 Authctxt *authctxt = ssh->authctxt;
621 input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_failure() argument
623 Authctxt *authctxt = ssh->authctxt; in input_userauth_failure()
630 if (sshpkt_get_cstring(ssh, &authlist, NULL) != 0 || in input_userauth_failure()
631 sshpkt_get_u8(ssh, &partial) != 0 || in input_userauth_failure()
632 sshpkt_get_end(ssh) != 0) in input_userauth_failure()
643 userauth(ssh, authlist); in input_userauth_failure()
681 input_userauth_pk_ok(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_pk_ok() argument
683 Authctxt *authctxt = ssh->authctxt; in input_userauth_pk_ok()
695 if ((r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || in input_userauth_pk_ok()
696 (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0 || in input_userauth_pk_ok()
697 (r = sshpkt_get_end(ssh)) != 0) in input_userauth_pk_ok()
738 sent = sign_and_send_pubkey(ssh, id); in input_userauth_pk_ok()
749 userauth(ssh, NULL); in input_userauth_pk_ok()
755 userauth_gssapi(struct ssh *ssh) in userauth_gssapi() argument
757 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi()
788 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_gssapi()
789 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_gssapi()
790 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_gssapi()
791 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_gssapi()
792 (r = sshpkt_put_u32(ssh, 1)) != 0 || in userauth_gssapi()
793 (r = sshpkt_put_u32(ssh, (mech->length) + 2)) != 0 || in userauth_gssapi()
794 (r = sshpkt_put_u8(ssh, SSH_GSS_OIDTYPE)) != 0 || in userauth_gssapi()
795 (r = sshpkt_put_u8(ssh, mech->length)) != 0 || in userauth_gssapi()
796 (r = sshpkt_put(ssh, mech->elements, mech->length)) != 0 || in userauth_gssapi()
797 (r = sshpkt_send(ssh)) != 0) in userauth_gssapi()
800 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE, &input_gssapi_response); in userauth_gssapi()
801 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token); in userauth_gssapi()
802 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERROR, &input_gssapi_error); in userauth_gssapi()
803 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok); in userauth_gssapi()
811 userauth_gssapi_cleanup(struct ssh *ssh) in userauth_gssapi_cleanup() argument
813 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi_cleanup()
821 process_gssapi_token(struct ssh *ssh, gss_buffer_t recv_tok) in process_gssapi_token() argument
823 Authctxt *authctxt = ssh->authctxt; in process_gssapi_token()
839 if ((r = sshpkt_start(ssh, type)) != 0 || in process_gssapi_token()
840 (r = sshpkt_put_string(ssh, send_tok.value, in process_gssapi_token()
842 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
851 if ((r = sshpkt_start(ssh, in process_gssapi_token()
853 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
862 ssh->kex->session_id); in process_gssapi_token()
871 if ((r = sshpkt_start(ssh, in process_gssapi_token()
873 (r = sshpkt_put_string(ssh, mic.value, in process_gssapi_token()
875 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
888 input_gssapi_response(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_response() argument
890 Authctxt *authctxt = ssh->authctxt; in input_gssapi_response()
901 if ((r = sshpkt_get_string(ssh, &oidv, &oidlen)) != 0) in input_gssapi_response()
908 userauth(ssh, NULL); in input_gssapi_response()
915 if ((r = sshpkt_get_end(ssh)) != 0) in input_gssapi_response()
918 if (GSS_ERROR(process_gssapi_token(ssh, GSS_C_NO_BUFFER))) { in input_gssapi_response()
921 userauth(ssh, NULL); in input_gssapi_response()
932 input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_token() argument
934 Authctxt *authctxt = ssh->authctxt; in input_gssapi_token()
944 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_token()
945 (r = sshpkt_get_end(ssh)) != 0) in input_gssapi_token()
950 status = process_gssapi_token(ssh, &recv_tok); in input_gssapi_token()
954 userauth(ssh, NULL); in input_gssapi_token()
964 input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_errtok() argument
966 Authctxt *authctxt = ssh->authctxt; in input_gssapi_errtok()
979 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_errtok()
980 (r = sshpkt_get_end(ssh)) != 0) { in input_gssapi_errtok()
998 input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_error() argument
1004 if ((r = sshpkt_get_u32(ssh, NULL)) != 0 || /* maj */ in input_gssapi_error()
1005 (r = sshpkt_get_u32(ssh, NULL)) != 0 || /* min */ in input_gssapi_error()
1006 (r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 || in input_gssapi_error()
1007 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_gssapi_error()
1009 r = sshpkt_get_end(ssh); in input_gssapi_error()
1019 userauth_none(struct ssh *ssh) in userauth_none() argument
1021 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_none()
1025 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_none()
1026 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_none()
1027 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_none()
1028 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_none()
1029 (r = sshpkt_send(ssh)) != 0) in userauth_none()
1035 userauth_passwd(struct ssh *ssh) in userauth_passwd() argument
1037 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_passwd()
1051 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_passwd()
1052 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_passwd()
1053 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_passwd()
1054 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_passwd()
1055 (r = sshpkt_put_u8(ssh, 0)) != 0 || in userauth_passwd()
1056 (r = sshpkt_put_cstring(ssh, password)) != 0 || in userauth_passwd()
1057 (r = sshpkt_add_padding(ssh, 64)) != 0 || in userauth_passwd()
1058 (r = sshpkt_send(ssh)) != 0) in userauth_passwd()
1065 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in userauth_passwd()
1075 input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) in input_userauth_passwd_changereq() argument
1077 Authctxt *authctxt = ssh->authctxt; in input_userauth_passwd_changereq()
1090 if ((r = sshpkt_get_cstring(ssh, &info, NULL)) != 0 || in input_userauth_passwd_changereq()
1091 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_passwd_changereq()
1095 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in input_userauth_passwd_changereq()
1096 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in input_userauth_passwd_changereq()
1097 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in input_userauth_passwd_changereq()
1098 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in input_userauth_passwd_changereq()
1099 (r = sshpkt_put_u8(ssh, 1)) != 0) /* additional info */ in input_userauth_passwd_changereq()
1106 if ((r = sshpkt_put_cstring(ssh, password)) != 0) in input_userauth_passwd_changereq()
1132 if ((r = sshpkt_put_cstring(ssh, password)) != 0 || in input_userauth_passwd_changereq()
1133 (r = sshpkt_add_padding(ssh, 64)) != 0 || in input_userauth_passwd_changereq()
1134 (r = sshpkt_send(ssh)) != 0) in input_userauth_passwd_changereq()
1137 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in input_userauth_passwd_changereq()
1156 key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) in key_sig_algorithm() argument
1166 if (ssh == NULL || ssh->kex->server_sig_algs == NULL || in key_sig_algorithm()
1168 (key->type == KEY_RSA_CERT && (ssh->compat & SSH_BUG_SIGTYPE))) { in key_sig_algorithm()
1178 server_sig_algs = ssh->kex->server_sig_algs; in key_sig_algorithm()
1179 if (key->type == KEY_RSA && (ssh->compat & SSH_BUG_SIGTYPE74)) in key_sig_algorithm()
1311 sign_and_send_pubkey(struct ssh *ssh, Identity *id) in sign_and_send_pubkey() argument
1313 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in sign_and_send_pubkey()
1324 if ((ssh->kex->flags & KEX_HAS_PUBKEY_HOSTBOUND) != 0 && in sign_and_send_pubkey()
1392 if ((alg = key_sig_algorithm(fallback_sigtype ? NULL : ssh, in sign_and_send_pubkey()
1402 if (ssh->compat & SSH_OLD_SESSIONID) { in sign_and_send_pubkey()
1403 if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1407 ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1421 if (ssh->kex->initial_hostkey == NULL) { in sign_and_send_pubkey()
1425 if ((r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0) in sign_and_send_pubkey()
1430 sshbuf_ptr(b), sshbuf_len(b), ssh->compat, alg); in sign_and_send_pubkey()
1465 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in sign_and_send_pubkey()
1466 (r = sshpkt_putb(ssh, b)) != 0 || in sign_and_send_pubkey()
1467 (r = sshpkt_send(ssh)) != 0) in sign_and_send_pubkey()
1482 send_pubkey_test(struct ssh *ssh, Identity *id) in send_pubkey_test() argument
1484 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in send_pubkey_test()
1491 if ((alg = key_sig_algorithm(ssh, id->key)) == NULL) { in send_pubkey_test()
1502 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok); in send_pubkey_test()
1504 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in send_pubkey_test()
1505 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in send_pubkey_test()
1506 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in send_pubkey_test()
1507 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in send_pubkey_test()
1508 (r = sshpkt_put_u8(ssh, have_sig)) != 0 || in send_pubkey_test()
1509 (r = sshpkt_put_cstring(ssh, alg)) != 0 || in send_pubkey_test()
1510 (r = sshpkt_put_string(ssh, blob, bloblen)) != 0 || in send_pubkey_test()
1511 (r = sshpkt_send(ssh)) != 0) in send_pubkey_test()
1631 get_agent_identities(struct ssh *ssh, int *agent_fdp, in get_agent_identities() argument
1642 if ((r = ssh_agent_bind_hostkey(agent_fd, ssh->kex->initial_hostkey, in get_agent_identities()
1643 ssh->kex->session_id, ssh->kex->initial_sig, 0)) == 0) in get_agent_identities()
1669 pubkey_prepare(struct ssh *ssh, Authctxt *authctxt) in pubkey_prepare() argument
1731 if ((r = get_agent_identities(ssh, &agent_fd, &idlist)) == 0) { in pubkey_prepare()
1804 } else if (ssh->kex->server_sig_algs != NULL && in pubkey_prepare()
1805 (cp = key_sig_algorithm(ssh, id->key)) == NULL) { in pubkey_prepare()
1830 pubkey_cleanup(struct ssh *ssh) in pubkey_cleanup() argument
1832 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in pubkey_cleanup()
1858 userauth_pubkey(struct ssh *ssh) in userauth_pubkey() argument
1860 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_pubkey()
1867 pubkey_prepare(ssh, authctxt); in userauth_pubkey()
1886 sent = send_pubkey_test(ssh, id); in userauth_pubkey()
1893 sent = sign_and_send_pubkey(ssh, id); in userauth_pubkey()
1910 userauth_kbdint(struct ssh *ssh) in userauth_kbdint() argument
1912 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_kbdint()
1920 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, NULL); in userauth_kbdint()
1925 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_kbdint()
1926 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_kbdint()
1927 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_kbdint()
1928 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_kbdint()
1929 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* lang */ in userauth_kbdint()
1930 (r = sshpkt_put_cstring(ssh, options.kbd_interactive_devices ? in userauth_kbdint()
1932 (r = sshpkt_send(ssh)) != 0) in userauth_kbdint()
1935 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, &input_userauth_info_req); in userauth_kbdint()
1943 input_userauth_info_req(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_req() argument
1945 Authctxt *authctxt = ssh->authctxt; in input_userauth_info_req()
1959 if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0 || in input_userauth_info_req()
1960 (r = sshpkt_get_cstring(ssh, &inst, NULL)) != 0 || in input_userauth_info_req()
1961 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_info_req()
1968 if ((r = sshpkt_get_u32(ssh, &num_prompts)) != 0) in input_userauth_info_req()
1976 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE)) != 0 || in input_userauth_info_req()
1977 (r = sshpkt_put_u32(ssh, num_prompts)) != 0) in input_userauth_info_req()
1982 if ((r = sshpkt_get_cstring(ssh, &prompt, NULL)) != 0 || in input_userauth_info_req()
1983 (r = sshpkt_get_u8(ssh, &echo)) != 0) in input_userauth_info_req()
1990 if ((r = sshpkt_put_cstring(ssh, response)) != 0) in input_userauth_info_req()
1998 if ((r = sshpkt_get_end(ssh)) != 0 || in input_userauth_info_req()
1999 (r = sshpkt_add_padding(ssh, 64)) != 0) in input_userauth_info_req()
2001 r = sshpkt_send(ssh); in input_userauth_info_req()
2014 ssh_keysign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp, in ssh_keysign() argument
2021 int sock = ssh_packet_get_connection_in(ssh); in ssh_keysign()
2130 userauth_hostbased(struct ssh *ssh) in userauth_hostbased() argument
2132 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_hostbased()
2195 lname = get_local_name(ssh_packet_get_connection_in(ssh)); in userauth_hostbased()
2214 if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 || in userauth_hostbased()
2230 if ((r = ssh_keysign(ssh, private, &sig, &siglen, in userauth_hostbased()
2236 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_hostbased()
2237 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_hostbased()
2238 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_hostbased()
2239 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_hostbased()
2240 (r = sshpkt_put_cstring(ssh, authctxt->active_ktype)) != 0 || in userauth_hostbased()
2241 (r = sshpkt_put_string(ssh, keyblob, keylen)) != 0 || in userauth_hostbased()
2242 (r = sshpkt_put_cstring(ssh, chost)) != 0 || in userauth_hostbased()
2243 (r = sshpkt_put_cstring(ssh, authctxt->local_user)) != 0 || in userauth_hostbased()
2244 (r = sshpkt_put_string(ssh, sig, siglen)) != 0 || in userauth_hostbased()
2245 (r = sshpkt_send(ssh)) != 0) { in userauth_hostbased()