Lines Matching refs:ssh

96 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh)  in verify_host_key_callback()  argument
220 ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port, in ssh_kex2() argument
232 ssh_packet_set_rekey_limits(ssh, options.rekey_limit, in ssh_kex2()
255 kex_proposal_populate_entries(ssh, myproposal, in ssh_kex2()
263 if ((r = kex_setup(ssh, myproposal)) != 0) in ssh_kex2()
266 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; in ssh_kex2()
267 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; in ssh_kex2()
268 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; in ssh_kex2()
269 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; in ssh_kex2()
270 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client; in ssh_kex2()
271 ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; in ssh_kex2()
272 ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; in ssh_kex2()
274 ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client; in ssh_kex2()
277 ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client; in ssh_kex2()
278 ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client; in ssh_kex2()
279 ssh->kex->verify_host_key=&verify_host_key_callback; in ssh_kex2()
281 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done); in ssh_kex2()
286 if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 || in ssh_kex2()
287 (r = sshpkt_put_cstring(ssh, "markus")) != 0 || in ssh_kex2()
288 (r = sshpkt_send(ssh)) != 0 || in ssh_kex2()
289 (r = ssh_packet_write_wait(ssh)) != 0) in ssh_kex2()
345 int (*userauth)(struct ssh *ssh);
346 void (*cleanup)(struct ssh *ssh);
351 static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
352 static int input_userauth_success(int, u_int32_t, struct ssh *);
353 static int input_userauth_failure(int, u_int32_t, struct ssh *);
354 static int input_userauth_banner(int, u_int32_t, struct ssh *);
355 static int input_userauth_error(int, u_int32_t, struct ssh *);
356 static int input_userauth_info_req(int, u_int32_t, struct ssh *);
357 static int input_userauth_pk_ok(int, u_int32_t, struct ssh *);
358 static int input_userauth_passwd_changereq(int, u_int32_t, struct ssh *);
360 static int userauth_none(struct ssh *);
361 static int userauth_pubkey(struct ssh *);
362 static int userauth_passwd(struct ssh *);
363 static int userauth_kbdint(struct ssh *);
364 static int userauth_hostbased(struct ssh *);
367 static int userauth_gssapi(struct ssh *);
368 static void userauth_gssapi_cleanup(struct ssh *);
369 static int input_gssapi_response(int type, u_int32_t, struct ssh *);
370 static int input_gssapi_token(int type, u_int32_t, struct ssh *);
371 static int input_gssapi_error(int, u_int32_t, struct ssh *);
372 static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
375 void userauth(struct ssh *, char *);
377 static void pubkey_cleanup(struct ssh *);
378 static int sign_and_send_pubkey(struct ssh *ssh, Identity *);
379 static void pubkey_prepare(struct ssh *, Authctxt *);
424 ssh_userauth2(struct ssh *ssh, const char *local_user, in ssh_userauth2() argument
456 if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_REQUEST)) != 0 || in ssh_userauth2()
457 (r = sshpkt_put_cstring(ssh, "ssh-userauth")) != 0 || in ssh_userauth2()
458 (r = sshpkt_send(ssh)) != 0) in ssh_userauth2()
461 ssh->authctxt = &authctxt; in ssh_userauth2()
462 ssh_dispatch_init(ssh, &input_userauth_error); in ssh_userauth2()
463 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info); in ssh_userauth2()
464 ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); in ssh_userauth2()
465 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ in ssh_userauth2()
466 pubkey_cleanup(ssh); in ssh_userauth2()
475 ssh->authctxt = NULL; in ssh_userauth2()
477 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); in ssh_userauth2()
481 if (ssh_packet_connection_is_on_socket(ssh)) { in ssh_userauth2()
483 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), in ssh_userauth2()
492 input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_service_accept() argument
496 if (ssh_packet_remaining(ssh) > 0) { in input_userauth_service_accept()
499 if ((r = sshpkt_get_cstring(ssh, &reply, NULL)) != 0) in input_userauth_service_accept()
506 if ((r = sshpkt_get_end(ssh)) != 0) in input_userauth_service_accept()
511 userauth_none(ssh); in input_userauth_service_accept()
514 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, ssh->kex->ext_info_s ? in input_userauth_service_accept()
516 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success); in input_userauth_service_accept()
517 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure); in input_userauth_service_accept()
518 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner); in input_userauth_service_accept()
525 userauth(struct ssh *ssh, char *authlist) in userauth() argument
527 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth()
530 authctxt->method->cleanup(ssh); in userauth()
548 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_PER_METHOD_MIN, in userauth()
552 if (method->userauth(ssh) != 0) { in userauth()
563 input_userauth_error(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_error() argument
570 input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_banner() argument
577 if ((r = sshpkt_get_cstring(ssh, &msg, &len)) != 0 || in input_userauth_banner()
578 (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) in input_userauth_banner()
589 input_userauth_success(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_success() argument
591 Authctxt *authctxt = ssh->authctxt; in input_userauth_success()
598 authctxt->method->cleanup(ssh); in input_userauth_success()
602 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error); in input_userauth_success()
608 input_userauth_success_unexpected(int type, u_int32_t seq, struct ssh *ssh)
610 Authctxt *authctxt = ssh->authctxt;
622 input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_failure() argument
624 Authctxt *authctxt = ssh->authctxt; in input_userauth_failure()
631 if (sshpkt_get_cstring(ssh, &authlist, NULL) != 0 || in input_userauth_failure()
632 sshpkt_get_u8(ssh, &partial) != 0 || in input_userauth_failure()
633 sshpkt_get_end(ssh) != 0) in input_userauth_failure()
644 userauth(ssh, authlist); in input_userauth_failure()
682 input_userauth_pk_ok(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_pk_ok() argument
684 Authctxt *authctxt = ssh->authctxt; in input_userauth_pk_ok()
696 if ((r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || in input_userauth_pk_ok()
697 (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0 || in input_userauth_pk_ok()
698 (r = sshpkt_get_end(ssh)) != 0) in input_userauth_pk_ok()
739 sent = sign_and_send_pubkey(ssh, id); in input_userauth_pk_ok()
750 userauth(ssh, NULL); in input_userauth_pk_ok()
756 userauth_gssapi(struct ssh *ssh) in userauth_gssapi() argument
758 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi()
789 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_gssapi()
790 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_gssapi()
791 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_gssapi()
792 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_gssapi()
793 (r = sshpkt_put_u32(ssh, 1)) != 0 || in userauth_gssapi()
794 (r = sshpkt_put_u32(ssh, (mech->length) + 2)) != 0 || in userauth_gssapi()
795 (r = sshpkt_put_u8(ssh, SSH_GSS_OIDTYPE)) != 0 || in userauth_gssapi()
796 (r = sshpkt_put_u8(ssh, mech->length)) != 0 || in userauth_gssapi()
797 (r = sshpkt_put(ssh, mech->elements, mech->length)) != 0 || in userauth_gssapi()
798 (r = sshpkt_send(ssh)) != 0) in userauth_gssapi()
801 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE, &input_gssapi_response); in userauth_gssapi()
802 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token); in userauth_gssapi()
803 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERROR, &input_gssapi_error); in userauth_gssapi()
804 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok); in userauth_gssapi()
812 userauth_gssapi_cleanup(struct ssh *ssh) in userauth_gssapi_cleanup() argument
814 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi_cleanup()
822 process_gssapi_token(struct ssh *ssh, gss_buffer_t recv_tok) in process_gssapi_token() argument
824 Authctxt *authctxt = ssh->authctxt; in process_gssapi_token()
840 if ((r = sshpkt_start(ssh, type)) != 0 || in process_gssapi_token()
841 (r = sshpkt_put_string(ssh, send_tok.value, in process_gssapi_token()
843 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
852 if ((r = sshpkt_start(ssh, in process_gssapi_token()
854 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
863 ssh->kex->session_id); in process_gssapi_token()
872 if ((r = sshpkt_start(ssh, in process_gssapi_token()
874 (r = sshpkt_put_string(ssh, mic.value, in process_gssapi_token()
876 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
889 input_gssapi_response(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_response() argument
891 Authctxt *authctxt = ssh->authctxt; in input_gssapi_response()
902 if ((r = sshpkt_get_string(ssh, &oidv, &oidlen)) != 0) in input_gssapi_response()
909 userauth(ssh, NULL); in input_gssapi_response()
916 if ((r = sshpkt_get_end(ssh)) != 0) in input_gssapi_response()
919 if (GSS_ERROR(process_gssapi_token(ssh, GSS_C_NO_BUFFER))) { in input_gssapi_response()
922 userauth(ssh, NULL); in input_gssapi_response()
933 input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_token() argument
935 Authctxt *authctxt = ssh->authctxt; in input_gssapi_token()
945 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_token()
946 (r = sshpkt_get_end(ssh)) != 0) in input_gssapi_token()
951 status = process_gssapi_token(ssh, &recv_tok); in input_gssapi_token()
955 userauth(ssh, NULL); in input_gssapi_token()
965 input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_errtok() argument
967 Authctxt *authctxt = ssh->authctxt; in input_gssapi_errtok()
980 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_errtok()
981 (r = sshpkt_get_end(ssh)) != 0) { in input_gssapi_errtok()
999 input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_error() argument
1005 if ((r = sshpkt_get_u32(ssh, NULL)) != 0 || /* maj */ in input_gssapi_error()
1006 (r = sshpkt_get_u32(ssh, NULL)) != 0 || /* min */ in input_gssapi_error()
1007 (r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 || in input_gssapi_error()
1008 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_gssapi_error()
1010 r = sshpkt_get_end(ssh); in input_gssapi_error()
1020 userauth_none(struct ssh *ssh) in userauth_none() argument
1022 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_none()
1026 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_none()
1027 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_none()
1028 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_none()
1029 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_none()
1030 (r = sshpkt_send(ssh)) != 0) in userauth_none()
1036 userauth_passwd(struct ssh *ssh) in userauth_passwd() argument
1038 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_passwd()
1052 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_passwd()
1053 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_passwd()
1054 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_passwd()
1055 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_passwd()
1056 (r = sshpkt_put_u8(ssh, 0)) != 0 || in userauth_passwd()
1057 (r = sshpkt_put_cstring(ssh, password)) != 0 || in userauth_passwd()
1058 (r = sshpkt_add_padding(ssh, 64)) != 0 || in userauth_passwd()
1059 (r = sshpkt_send(ssh)) != 0) in userauth_passwd()
1066 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in userauth_passwd()
1076 input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) in input_userauth_passwd_changereq() argument
1078 Authctxt *authctxt = ssh->authctxt; in input_userauth_passwd_changereq()
1091 if ((r = sshpkt_get_cstring(ssh, &info, NULL)) != 0 || in input_userauth_passwd_changereq()
1092 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_passwd_changereq()
1096 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in input_userauth_passwd_changereq()
1097 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in input_userauth_passwd_changereq()
1098 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in input_userauth_passwd_changereq()
1099 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in input_userauth_passwd_changereq()
1100 (r = sshpkt_put_u8(ssh, 1)) != 0) /* additional info */ in input_userauth_passwd_changereq()
1107 if ((r = sshpkt_put_cstring(ssh, password)) != 0) in input_userauth_passwd_changereq()
1133 if ((r = sshpkt_put_cstring(ssh, password)) != 0 || in input_userauth_passwd_changereq()
1134 (r = sshpkt_add_padding(ssh, 64)) != 0 || in input_userauth_passwd_changereq()
1135 (r = sshpkt_send(ssh)) != 0) in input_userauth_passwd_changereq()
1138 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in input_userauth_passwd_changereq()
1157 key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) in key_sig_algorithm() argument
1167 if (ssh == NULL || ssh->kex->server_sig_algs == NULL || in key_sig_algorithm()
1169 (key->type == KEY_RSA_CERT && (ssh->compat & SSH_BUG_SIGTYPE))) { in key_sig_algorithm()
1179 server_sig_algs = ssh->kex->server_sig_algs; in key_sig_algorithm()
1180 if (key->type == KEY_RSA && (ssh->compat & SSH_BUG_SIGTYPE74)) in key_sig_algorithm()
1312 sign_and_send_pubkey(struct ssh *ssh, Identity *id) in sign_and_send_pubkey() argument
1314 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in sign_and_send_pubkey()
1325 if ((ssh->kex->flags & KEX_HAS_PUBKEY_HOSTBOUND) != 0 && in sign_and_send_pubkey()
1393 if ((alg = key_sig_algorithm(fallback_sigtype ? NULL : ssh, in sign_and_send_pubkey()
1403 if (ssh->compat & SSH_OLD_SESSIONID) { in sign_and_send_pubkey()
1404 if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1408 ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1422 if (ssh->kex->initial_hostkey == NULL) { in sign_and_send_pubkey()
1426 if ((r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0) in sign_and_send_pubkey()
1431 sshbuf_ptr(b), sshbuf_len(b), ssh->compat, alg); in sign_and_send_pubkey()
1466 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in sign_and_send_pubkey()
1467 (r = sshpkt_putb(ssh, b)) != 0 || in sign_and_send_pubkey()
1468 (r = sshpkt_send(ssh)) != 0) in sign_and_send_pubkey()
1483 send_pubkey_test(struct ssh *ssh, Identity *id) in send_pubkey_test() argument
1485 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in send_pubkey_test()
1492 if ((alg = key_sig_algorithm(ssh, id->key)) == NULL) { in send_pubkey_test()
1503 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok); in send_pubkey_test()
1505 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in send_pubkey_test()
1506 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in send_pubkey_test()
1507 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in send_pubkey_test()
1508 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in send_pubkey_test()
1509 (r = sshpkt_put_u8(ssh, have_sig)) != 0 || in send_pubkey_test()
1510 (r = sshpkt_put_cstring(ssh, alg)) != 0 || in send_pubkey_test()
1511 (r = sshpkt_put_string(ssh, blob, bloblen)) != 0 || in send_pubkey_test()
1512 (r = sshpkt_send(ssh)) != 0) in send_pubkey_test()
1632 get_agent_identities(struct ssh *ssh, int *agent_fdp, in get_agent_identities() argument
1643 if ((r = ssh_agent_bind_hostkey(agent_fd, ssh->kex->initial_hostkey, in get_agent_identities()
1644 ssh->kex->session_id, ssh->kex->initial_sig, 0)) == 0) in get_agent_identities()
1670 pubkey_prepare(struct ssh *ssh, Authctxt *authctxt) in pubkey_prepare() argument
1732 if ((r = get_agent_identities(ssh, &agent_fd, &idlist)) == 0) { in pubkey_prepare()
1805 } else if (ssh->kex->server_sig_algs != NULL && in pubkey_prepare()
1806 (cp = key_sig_algorithm(ssh, id->key)) == NULL) { in pubkey_prepare()
1831 pubkey_cleanup(struct ssh *ssh) in pubkey_cleanup() argument
1833 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in pubkey_cleanup()
1859 userauth_pubkey(struct ssh *ssh) in userauth_pubkey() argument
1861 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_pubkey()
1868 pubkey_prepare(ssh, authctxt); in userauth_pubkey()
1887 sent = send_pubkey_test(ssh, id); in userauth_pubkey()
1894 sent = sign_and_send_pubkey(ssh, id); in userauth_pubkey()
1911 userauth_kbdint(struct ssh *ssh) in userauth_kbdint() argument
1913 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_kbdint()
1921 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, NULL); in userauth_kbdint()
1926 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_kbdint()
1927 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_kbdint()
1928 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_kbdint()
1929 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_kbdint()
1930 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* lang */ in userauth_kbdint()
1931 (r = sshpkt_put_cstring(ssh, options.kbd_interactive_devices ? in userauth_kbdint()
1933 (r = sshpkt_send(ssh)) != 0) in userauth_kbdint()
1936 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, &input_userauth_info_req); in userauth_kbdint()
1944 input_userauth_info_req(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_req() argument
1946 Authctxt *authctxt = ssh->authctxt; in input_userauth_info_req()
1960 if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0 || in input_userauth_info_req()
1961 (r = sshpkt_get_cstring(ssh, &inst, NULL)) != 0 || in input_userauth_info_req()
1962 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_info_req()
1969 if ((r = sshpkt_get_u32(ssh, &num_prompts)) != 0) in input_userauth_info_req()
1977 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE)) != 0 || in input_userauth_info_req()
1978 (r = sshpkt_put_u32(ssh, num_prompts)) != 0) in input_userauth_info_req()
1983 if ((r = sshpkt_get_cstring(ssh, &prompt, NULL)) != 0 || in input_userauth_info_req()
1984 (r = sshpkt_get_u8(ssh, &echo)) != 0) in input_userauth_info_req()
1991 if ((r = sshpkt_put_cstring(ssh, response)) != 0) in input_userauth_info_req()
1999 if ((r = sshpkt_get_end(ssh)) != 0 || in input_userauth_info_req()
2000 (r = sshpkt_add_padding(ssh, 64)) != 0) in input_userauth_info_req()
2002 r = sshpkt_send(ssh); in input_userauth_info_req()
2015 ssh_keysign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp, in ssh_keysign() argument
2022 int sock = ssh_packet_get_connection_in(ssh); in ssh_keysign()
2131 userauth_hostbased(struct ssh *ssh) in userauth_hostbased() argument
2133 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_hostbased()
2196 lname = get_local_name(ssh_packet_get_connection_in(ssh)); in userauth_hostbased()
2215 if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 || in userauth_hostbased()
2231 if ((r = ssh_keysign(ssh, private, &sig, &siglen, in userauth_hostbased()
2237 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_hostbased()
2238 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_hostbased()
2239 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_hostbased()
2240 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_hostbased()
2241 (r = sshpkt_put_cstring(ssh, authctxt->active_ktype)) != 0 || in userauth_hostbased()
2242 (r = sshpkt_put_string(ssh, keyblob, keylen)) != 0 || in userauth_hostbased()
2243 (r = sshpkt_put_cstring(ssh, chost)) != 0 || in userauth_hostbased()
2244 (r = sshpkt_put_cstring(ssh, authctxt->local_user)) != 0 || in userauth_hostbased()
2245 (r = sshpkt_put_string(ssh, sig, siglen)) != 0 || in userauth_hostbased()
2246 (r = sshpkt_send(ssh)) != 0) { in userauth_hostbased()