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->verify_host_key=&verify_host_key_callback; in ssh_kex2()
279 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done); in ssh_kex2()
284 if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 || in ssh_kex2()
285 (r = sshpkt_put_cstring(ssh, "markus")) != 0 || in ssh_kex2()
286 (r = sshpkt_send(ssh)) != 0 || in ssh_kex2()
287 (r = ssh_packet_write_wait(ssh)) != 0) in ssh_kex2()
343 int (*userauth)(struct ssh *ssh);
344 void (*cleanup)(struct ssh *ssh);
349 static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
350 static int input_userauth_success(int, u_int32_t, struct ssh *);
351 static int input_userauth_failure(int, u_int32_t, struct ssh *);
352 static int input_userauth_banner(int, u_int32_t, struct ssh *);
353 static int input_userauth_error(int, u_int32_t, struct ssh *);
354 static int input_userauth_info_req(int, u_int32_t, struct ssh *);
355 static int input_userauth_pk_ok(int, u_int32_t, struct ssh *);
356 static int input_userauth_passwd_changereq(int, u_int32_t, struct ssh *);
358 static int userauth_none(struct ssh *);
359 static int userauth_pubkey(struct ssh *);
360 static int userauth_passwd(struct ssh *);
361 static int userauth_kbdint(struct ssh *);
362 static int userauth_hostbased(struct ssh *);
365 static int userauth_gssapi(struct ssh *);
366 static void userauth_gssapi_cleanup(struct ssh *);
367 static int input_gssapi_response(int type, u_int32_t, struct ssh *);
368 static int input_gssapi_token(int type, u_int32_t, struct ssh *);
369 static int input_gssapi_error(int, u_int32_t, struct ssh *);
370 static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
373 void userauth(struct ssh *, char *);
375 static void pubkey_cleanup(struct ssh *);
376 static int sign_and_send_pubkey(struct ssh *ssh, Identity *);
377 static void pubkey_prepare(struct ssh *, Authctxt *);
422 ssh_userauth2(struct ssh *ssh, const char *local_user, in ssh_userauth2() argument
454 if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_REQUEST)) != 0 || in ssh_userauth2()
455 (r = sshpkt_put_cstring(ssh, "ssh-userauth")) != 0 || in ssh_userauth2()
456 (r = sshpkt_send(ssh)) != 0) in ssh_userauth2()
459 ssh->authctxt = &authctxt; in ssh_userauth2()
460 ssh_dispatch_init(ssh, &input_userauth_error); in ssh_userauth2()
461 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info); in ssh_userauth2()
462 ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); in ssh_userauth2()
463 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ in ssh_userauth2()
464 pubkey_cleanup(ssh); in ssh_userauth2()
473 ssh->authctxt = NULL; in ssh_userauth2()
475 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); in ssh_userauth2()
479 if (ssh_packet_connection_is_on_socket(ssh)) { in ssh_userauth2()
481 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), in ssh_userauth2()
490 input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_service_accept() argument
494 if (ssh_packet_remaining(ssh) > 0) { in input_userauth_service_accept()
497 if ((r = sshpkt_get_cstring(ssh, &reply, NULL)) != 0) in input_userauth_service_accept()
504 if ((r = sshpkt_get_end(ssh)) != 0) in input_userauth_service_accept()
509 userauth_none(ssh); in input_userauth_service_accept()
512 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, ssh->kex->ext_info_s ? in input_userauth_service_accept()
514 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success); in input_userauth_service_accept()
515 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure); in input_userauth_service_accept()
516 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner); in input_userauth_service_accept()
523 userauth(struct ssh *ssh, char *authlist) in userauth() argument
525 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth()
528 authctxt->method->cleanup(ssh); in userauth()
546 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_PER_METHOD_MIN, in userauth()
550 if (method->userauth(ssh) != 0) { in userauth()
561 input_userauth_error(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_error() argument
568 input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_banner() argument
575 if ((r = sshpkt_get_cstring(ssh, &msg, &len)) != 0 || in input_userauth_banner()
576 (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) in input_userauth_banner()
587 input_userauth_success(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_success() argument
589 Authctxt *authctxt = ssh->authctxt; in input_userauth_success()
596 authctxt->method->cleanup(ssh); in input_userauth_success()
600 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error); in input_userauth_success()
606 input_userauth_success_unexpected(int type, u_int32_t seq, struct ssh *ssh)
608 Authctxt *authctxt = ssh->authctxt;
620 input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_failure() argument
622 Authctxt *authctxt = ssh->authctxt; in input_userauth_failure()
629 if (sshpkt_get_cstring(ssh, &authlist, NULL) != 0 || in input_userauth_failure()
630 sshpkt_get_u8(ssh, &partial) != 0 || in input_userauth_failure()
631 sshpkt_get_end(ssh) != 0) in input_userauth_failure()
642 userauth(ssh, authlist); in input_userauth_failure()
680 input_userauth_pk_ok(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_pk_ok() argument
682 Authctxt *authctxt = ssh->authctxt; in input_userauth_pk_ok()
694 if ((r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || in input_userauth_pk_ok()
695 (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0 || in input_userauth_pk_ok()
696 (r = sshpkt_get_end(ssh)) != 0) in input_userauth_pk_ok()
734 sent = sign_and_send_pubkey(ssh, id); in input_userauth_pk_ok()
745 userauth(ssh, NULL); in input_userauth_pk_ok()
751 userauth_gssapi(struct ssh *ssh) in userauth_gssapi() argument
753 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi()
784 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_gssapi()
785 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_gssapi()
786 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_gssapi()
787 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_gssapi()
788 (r = sshpkt_put_u32(ssh, 1)) != 0 || in userauth_gssapi()
789 (r = sshpkt_put_u32(ssh, (mech->length) + 2)) != 0 || in userauth_gssapi()
790 (r = sshpkt_put_u8(ssh, SSH_GSS_OIDTYPE)) != 0 || in userauth_gssapi()
791 (r = sshpkt_put_u8(ssh, mech->length)) != 0 || in userauth_gssapi()
792 (r = sshpkt_put(ssh, mech->elements, mech->length)) != 0 || in userauth_gssapi()
793 (r = sshpkt_send(ssh)) != 0) in userauth_gssapi()
796 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE, &input_gssapi_response); in userauth_gssapi()
797 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token); in userauth_gssapi()
798 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERROR, &input_gssapi_error); in userauth_gssapi()
799 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok); in userauth_gssapi()
807 userauth_gssapi_cleanup(struct ssh *ssh) in userauth_gssapi_cleanup() argument
809 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi_cleanup()
817 process_gssapi_token(struct ssh *ssh, gss_buffer_t recv_tok) in process_gssapi_token() argument
819 Authctxt *authctxt = ssh->authctxt; in process_gssapi_token()
835 if ((r = sshpkt_start(ssh, type)) != 0 || in process_gssapi_token()
836 (r = sshpkt_put_string(ssh, send_tok.value, in process_gssapi_token()
838 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
847 if ((r = sshpkt_start(ssh, in process_gssapi_token()
849 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
858 ssh->kex->session_id); in process_gssapi_token()
867 if ((r = sshpkt_start(ssh, in process_gssapi_token()
869 (r = sshpkt_put_string(ssh, mic.value, in process_gssapi_token()
871 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
884 input_gssapi_response(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_response() argument
886 Authctxt *authctxt = ssh->authctxt; in input_gssapi_response()
897 if ((r = sshpkt_get_string(ssh, &oidv, &oidlen)) != 0) in input_gssapi_response()
904 userauth(ssh, NULL); in input_gssapi_response()
911 if ((r = sshpkt_get_end(ssh)) != 0) in input_gssapi_response()
914 if (GSS_ERROR(process_gssapi_token(ssh, GSS_C_NO_BUFFER))) { in input_gssapi_response()
917 userauth(ssh, NULL); in input_gssapi_response()
928 input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_token() argument
930 Authctxt *authctxt = ssh->authctxt; in input_gssapi_token()
940 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_token()
941 (r = sshpkt_get_end(ssh)) != 0) in input_gssapi_token()
946 status = process_gssapi_token(ssh, &recv_tok); in input_gssapi_token()
950 userauth(ssh, NULL); in input_gssapi_token()
960 input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_errtok() argument
962 Authctxt *authctxt = ssh->authctxt; in input_gssapi_errtok()
975 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_errtok()
976 (r = sshpkt_get_end(ssh)) != 0) { in input_gssapi_errtok()
994 input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_error() argument
1000 if ((r = sshpkt_get_u32(ssh, NULL)) != 0 || /* maj */ in input_gssapi_error()
1001 (r = sshpkt_get_u32(ssh, NULL)) != 0 || /* min */ in input_gssapi_error()
1002 (r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 || in input_gssapi_error()
1003 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_gssapi_error()
1005 r = sshpkt_get_end(ssh); in input_gssapi_error()
1015 userauth_none(struct ssh *ssh) in userauth_none() argument
1017 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_none()
1021 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_none()
1022 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_none()
1023 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_none()
1024 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_none()
1025 (r = sshpkt_send(ssh)) != 0) in userauth_none()
1031 userauth_passwd(struct ssh *ssh) in userauth_passwd() argument
1033 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_passwd()
1047 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_passwd()
1048 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_passwd()
1049 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_passwd()
1050 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_passwd()
1051 (r = sshpkt_put_u8(ssh, 0)) != 0 || in userauth_passwd()
1052 (r = sshpkt_put_cstring(ssh, password)) != 0 || in userauth_passwd()
1053 (r = sshpkt_add_padding(ssh, 64)) != 0 || in userauth_passwd()
1054 (r = sshpkt_send(ssh)) != 0) in userauth_passwd()
1061 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in userauth_passwd()
1071 input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) in input_userauth_passwd_changereq() argument
1073 Authctxt *authctxt = ssh->authctxt; in input_userauth_passwd_changereq()
1086 if ((r = sshpkt_get_cstring(ssh, &info, NULL)) != 0 || in input_userauth_passwd_changereq()
1087 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_passwd_changereq()
1091 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in input_userauth_passwd_changereq()
1092 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in input_userauth_passwd_changereq()
1093 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in input_userauth_passwd_changereq()
1094 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in input_userauth_passwd_changereq()
1095 (r = sshpkt_put_u8(ssh, 1)) != 0) /* additional info */ in input_userauth_passwd_changereq()
1102 if ((r = sshpkt_put_cstring(ssh, password)) != 0) in input_userauth_passwd_changereq()
1128 if ((r = sshpkt_put_cstring(ssh, password)) != 0 || in input_userauth_passwd_changereq()
1129 (r = sshpkt_add_padding(ssh, 64)) != 0 || in input_userauth_passwd_changereq()
1130 (r = sshpkt_send(ssh)) != 0) in input_userauth_passwd_changereq()
1133 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in input_userauth_passwd_changereq()
1152 key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) in key_sig_algorithm() argument
1162 if (ssh == NULL || ssh->kex->server_sig_algs == NULL || in key_sig_algorithm()
1164 (key->type == KEY_RSA_CERT && (ssh->compat & SSH_BUG_SIGTYPE))) { in key_sig_algorithm()
1174 server_sig_algs = ssh->kex->server_sig_algs; in key_sig_algorithm()
1175 if (key->type == KEY_RSA && (ssh->compat & SSH_BUG_SIGTYPE74)) in key_sig_algorithm()
1307 sign_and_send_pubkey(struct ssh *ssh, Identity *id) in sign_and_send_pubkey() argument
1309 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in sign_and_send_pubkey()
1320 if ((ssh->kex->flags & KEX_HAS_PUBKEY_HOSTBOUND) != 0 && in sign_and_send_pubkey()
1388 if ((alg = key_sig_algorithm(fallback_sigtype ? NULL : ssh, in sign_and_send_pubkey()
1398 if (ssh->compat & SSH_OLD_SESSIONID) { in sign_and_send_pubkey()
1399 if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1403 ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1417 if (ssh->kex->initial_hostkey == NULL) { in sign_and_send_pubkey()
1421 if ((r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0) in sign_and_send_pubkey()
1426 sshbuf_ptr(b), sshbuf_len(b), ssh->compat, alg); in sign_and_send_pubkey()
1461 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in sign_and_send_pubkey()
1462 (r = sshpkt_putb(ssh, b)) != 0 || in sign_and_send_pubkey()
1463 (r = sshpkt_send(ssh)) != 0) in sign_and_send_pubkey()
1478 send_pubkey_test(struct ssh *ssh, Identity *id) in send_pubkey_test() argument
1480 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in send_pubkey_test()
1487 if ((alg = key_sig_algorithm(ssh, id->key)) == NULL) { in send_pubkey_test()
1498 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok); in send_pubkey_test()
1500 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in send_pubkey_test()
1501 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in send_pubkey_test()
1502 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in send_pubkey_test()
1503 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in send_pubkey_test()
1504 (r = sshpkt_put_u8(ssh, have_sig)) != 0 || in send_pubkey_test()
1505 (r = sshpkt_put_cstring(ssh, alg)) != 0 || in send_pubkey_test()
1506 (r = sshpkt_put_string(ssh, blob, bloblen)) != 0 || in send_pubkey_test()
1507 (r = sshpkt_send(ssh)) != 0) in send_pubkey_test()
1627 get_agent_identities(struct ssh *ssh, int *agent_fdp, in get_agent_identities() argument
1638 if ((r = ssh_agent_bind_hostkey(agent_fd, ssh->kex->initial_hostkey, in get_agent_identities()
1639 ssh->kex->session_id, ssh->kex->initial_sig, 0)) == 0) in get_agent_identities()
1665 pubkey_prepare(struct ssh *ssh, Authctxt *authctxt) in pubkey_prepare() argument
1727 if ((r = get_agent_identities(ssh, &agent_fd, &idlist)) == 0) { in pubkey_prepare()
1800 } else if (ssh->kex->server_sig_algs != NULL && in pubkey_prepare()
1801 (cp = key_sig_algorithm(ssh, id->key)) == NULL) { in pubkey_prepare()
1826 pubkey_cleanup(struct ssh *ssh) in pubkey_cleanup() argument
1828 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in pubkey_cleanup()
1854 userauth_pubkey(struct ssh *ssh) in userauth_pubkey() argument
1856 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_pubkey()
1863 pubkey_prepare(ssh, authctxt); in userauth_pubkey()
1882 sent = send_pubkey_test(ssh, id); in userauth_pubkey()
1889 sent = sign_and_send_pubkey(ssh, id); in userauth_pubkey()
1906 userauth_kbdint(struct ssh *ssh) in userauth_kbdint() argument
1908 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_kbdint()
1916 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, NULL); in userauth_kbdint()
1921 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_kbdint()
1922 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_kbdint()
1923 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_kbdint()
1924 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_kbdint()
1925 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* lang */ in userauth_kbdint()
1926 (r = sshpkt_put_cstring(ssh, options.kbd_interactive_devices ? in userauth_kbdint()
1928 (r = sshpkt_send(ssh)) != 0) in userauth_kbdint()
1931 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, &input_userauth_info_req); in userauth_kbdint()
1939 input_userauth_info_req(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_req() argument
1941 Authctxt *authctxt = ssh->authctxt; in input_userauth_info_req()
1955 if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0 || in input_userauth_info_req()
1956 (r = sshpkt_get_cstring(ssh, &inst, NULL)) != 0 || in input_userauth_info_req()
1957 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_info_req()
1964 if ((r = sshpkt_get_u32(ssh, &num_prompts)) != 0) in input_userauth_info_req()
1972 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE)) != 0 || in input_userauth_info_req()
1973 (r = sshpkt_put_u32(ssh, num_prompts)) != 0) in input_userauth_info_req()
1978 if ((r = sshpkt_get_cstring(ssh, &prompt, NULL)) != 0 || in input_userauth_info_req()
1979 (r = sshpkt_get_u8(ssh, &echo)) != 0) in input_userauth_info_req()
1986 if ((r = sshpkt_put_cstring(ssh, response)) != 0) in input_userauth_info_req()
1994 if ((r = sshpkt_get_end(ssh)) != 0 || in input_userauth_info_req()
1995 (r = sshpkt_add_padding(ssh, 64)) != 0) in input_userauth_info_req()
1997 r = sshpkt_send(ssh); in input_userauth_info_req()
2010 ssh_keysign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp, in ssh_keysign() argument
2017 int sock = ssh_packet_get_connection_in(ssh); in ssh_keysign()
2126 userauth_hostbased(struct ssh *ssh) in userauth_hostbased() argument
2128 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_hostbased()
2191 lname = get_local_name(ssh_packet_get_connection_in(ssh)); in userauth_hostbased()
2210 if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 || in userauth_hostbased()
2226 if ((r = ssh_keysign(ssh, private, &sig, &siglen, in userauth_hostbased()
2232 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_hostbased()
2233 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_hostbased()
2234 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_hostbased()
2235 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_hostbased()
2236 (r = sshpkt_put_cstring(ssh, authctxt->active_ktype)) != 0 || in userauth_hostbased()
2237 (r = sshpkt_put_string(ssh, keyblob, keylen)) != 0 || in userauth_hostbased()
2238 (r = sshpkt_put_cstring(ssh, chost)) != 0 || in userauth_hostbased()
2239 (r = sshpkt_put_cstring(ssh, authctxt->local_user)) != 0 || in userauth_hostbased()
2240 (r = sshpkt_put_string(ssh, sig, siglen)) != 0 || in userauth_hostbased()
2241 (r = sshpkt_send(ssh)) != 0) { in userauth_hostbased()