Lines Matching refs:ssh
97 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh) in verify_host_key_callback() argument
216 ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port, in ssh_kex2() argument
246 myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh, s); in ssh_kex2()
248 compat_cipher_proposal(ssh, options.ciphers); in ssh_kex2()
250 compat_cipher_proposal(ssh, options.ciphers); in ssh_kex2()
259 compat_pkalg_proposal(ssh, in ssh_kex2()
264 compat_pkalg_proposal(ssh, options.hostkeyalgorithms); in ssh_kex2()
268 ssh_packet_set_rekey_limits(ssh, options.rekey_limit, in ssh_kex2()
272 if ((r = kex_setup(ssh, myproposal)) != 0) in ssh_kex2()
275 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; in ssh_kex2()
276 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; in ssh_kex2()
277 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; in ssh_kex2()
278 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; in ssh_kex2()
279 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client; in ssh_kex2()
280 ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; in ssh_kex2()
281 ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; in ssh_kex2()
283 ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client; in ssh_kex2()
286 ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client; in ssh_kex2()
287 ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client; in ssh_kex2()
288 ssh->kex->verify_host_key=&verify_host_key_callback; in ssh_kex2()
290 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done); in ssh_kex2()
294 compat_kex_proposal(ssh, options.kex_algorithms); in ssh_kex2()
295 if ((r = kex_prop2buf(ssh->kex->my, myproposal)) != 0) in ssh_kex2()
300 if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 || in ssh_kex2()
301 (r = sshpkt_put_cstring(ssh, "markus")) != 0 || in ssh_kex2()
302 (r = sshpkt_send(ssh)) != 0 || in ssh_kex2()
303 (r = ssh_packet_write_wait(ssh)) != 0) in ssh_kex2()
359 int (*userauth)(struct ssh *ssh);
360 void (*cleanup)(struct ssh *ssh);
365 static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
366 static int input_userauth_ext_info(int, u_int32_t, struct ssh *);
367 static int input_userauth_success(int, u_int32_t, struct ssh *);
368 static int input_userauth_failure(int, u_int32_t, struct ssh *);
369 static int input_userauth_banner(int, u_int32_t, struct ssh *);
370 static int input_userauth_error(int, u_int32_t, struct ssh *);
371 static int input_userauth_info_req(int, u_int32_t, struct ssh *);
372 static int input_userauth_pk_ok(int, u_int32_t, struct ssh *);
373 static int input_userauth_passwd_changereq(int, u_int32_t, struct ssh *);
375 static int userauth_none(struct ssh *);
376 static int userauth_pubkey(struct ssh *);
377 static int userauth_passwd(struct ssh *);
378 static int userauth_kbdint(struct ssh *);
379 static int userauth_hostbased(struct ssh *);
382 static int userauth_gssapi(struct ssh *);
383 static void userauth_gssapi_cleanup(struct ssh *);
384 static int input_gssapi_response(int type, u_int32_t, struct ssh *);
385 static int input_gssapi_token(int type, u_int32_t, struct ssh *);
386 static int input_gssapi_error(int, u_int32_t, struct ssh *);
387 static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
390 void userauth(struct ssh *, char *);
392 static void pubkey_cleanup(struct ssh *);
393 static int sign_and_send_pubkey(struct ssh *ssh, Identity *);
439 ssh_userauth2(struct ssh *ssh, const char *local_user, in ssh_userauth2() argument
473 if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_REQUEST)) != 0 || in ssh_userauth2()
474 (r = sshpkt_put_cstring(ssh, "ssh-userauth")) != 0 || in ssh_userauth2()
475 (r = sshpkt_send(ssh)) != 0) in ssh_userauth2()
478 ssh->authctxt = &authctxt; in ssh_userauth2()
479 ssh_dispatch_init(ssh, &input_userauth_error); in ssh_userauth2()
480 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info); in ssh_userauth2()
481 ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); in ssh_userauth2()
482 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ in ssh_userauth2()
483 pubkey_cleanup(ssh); in ssh_userauth2()
484 ssh->authctxt = NULL; in ssh_userauth2()
486 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); in ssh_userauth2()
490 if (ssh_packet_connection_is_on_socket(ssh)) { in ssh_userauth2()
492 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), in ssh_userauth2()
502 input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_service_accept() argument
506 if (ssh_packet_remaining(ssh) > 0) { in input_userauth_service_accept()
509 if ((r = sshpkt_get_cstring(ssh, &reply, NULL)) != 0) in input_userauth_service_accept()
516 if ((r = sshpkt_get_end(ssh)) != 0) in input_userauth_service_accept()
521 userauth_none(ssh); in input_userauth_service_accept()
523 ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_error); in input_userauth_service_accept()
524 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success); in input_userauth_service_accept()
525 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure); in input_userauth_service_accept()
526 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner); in input_userauth_service_accept()
534 input_userauth_ext_info(int type, u_int32_t seqnr, struct ssh *ssh) in input_userauth_ext_info() argument
536 return kex_input_ext_info(type, seqnr, ssh); in input_userauth_ext_info()
540 userauth(struct ssh *ssh, char *authlist) in userauth() argument
542 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth()
545 authctxt->method->cleanup(ssh); in userauth()
563 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_PER_METHOD_MIN, in userauth()
567 if (method->userauth(ssh) != 0) { in userauth()
579 input_userauth_error(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_error() argument
587 input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_banner() argument
594 if ((r = sshpkt_get_cstring(ssh, &msg, &len)) != 0 || in input_userauth_banner()
595 (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) in input_userauth_banner()
607 input_userauth_success(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_success() argument
609 Authctxt *authctxt = ssh->authctxt; in input_userauth_success()
616 authctxt->method->cleanup(ssh); in input_userauth_success()
625 input_userauth_success_unexpected(int type, u_int32_t seq, struct ssh *ssh)
627 Authctxt *authctxt = ssh->authctxt;
640 input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_failure() argument
642 Authctxt *authctxt = ssh->authctxt; in input_userauth_failure()
649 if (sshpkt_get_cstring(ssh, &authlist, NULL) != 0 || in input_userauth_failure()
650 sshpkt_get_u8(ssh, &partial) != 0 || in input_userauth_failure()
651 sshpkt_get_end(ssh) != 0) in input_userauth_failure()
662 userauth(ssh, authlist); in input_userauth_failure()
701 input_userauth_pk_ok(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_pk_ok() argument
703 Authctxt *authctxt = ssh->authctxt; in input_userauth_pk_ok()
715 if ((r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || in input_userauth_pk_ok()
716 (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0 || in input_userauth_pk_ok()
717 (r = sshpkt_get_end(ssh)) != 0) in input_userauth_pk_ok()
755 sent = sign_and_send_pubkey(ssh, id); in input_userauth_pk_ok()
766 userauth(ssh, NULL); in input_userauth_pk_ok()
772 userauth_gssapi(struct ssh *ssh) in userauth_gssapi() argument
774 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi()
805 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_gssapi()
806 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_gssapi()
807 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_gssapi()
808 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_gssapi()
809 (r = sshpkt_put_u32(ssh, 1)) != 0 || in userauth_gssapi()
810 (r = sshpkt_put_u32(ssh, (mech->length) + 2)) != 0 || in userauth_gssapi()
811 (r = sshpkt_put_u8(ssh, SSH_GSS_OIDTYPE)) != 0 || in userauth_gssapi()
812 (r = sshpkt_put_u8(ssh, mech->length)) != 0 || in userauth_gssapi()
813 (r = sshpkt_put(ssh, mech->elements, mech->length)) != 0 || in userauth_gssapi()
814 (r = sshpkt_send(ssh)) != 0) in userauth_gssapi()
817 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE, &input_gssapi_response); in userauth_gssapi()
818 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token); in userauth_gssapi()
819 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERROR, &input_gssapi_error); in userauth_gssapi()
820 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok); in userauth_gssapi()
828 userauth_gssapi_cleanup(struct ssh *ssh) in userauth_gssapi_cleanup() argument
830 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_gssapi_cleanup()
841 process_gssapi_token(struct ssh *ssh, gss_buffer_t recv_tok) in process_gssapi_token() argument
843 Authctxt *authctxt = ssh->authctxt; in process_gssapi_token()
859 if ((r = sshpkt_start(ssh, type)) != 0 || in process_gssapi_token()
860 (r = sshpkt_put_string(ssh, send_tok.value, in process_gssapi_token()
862 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
871 if ((r = sshpkt_start(ssh, in process_gssapi_token()
873 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
882 ssh->kex->session_id); in process_gssapi_token()
891 if ((r = sshpkt_start(ssh, in process_gssapi_token()
893 (r = sshpkt_put_string(ssh, mic.value, in process_gssapi_token()
895 (r = sshpkt_send(ssh)) != 0) in process_gssapi_token()
909 input_gssapi_response(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_response() argument
911 Authctxt *authctxt = ssh->authctxt; in input_gssapi_response()
922 if ((r = sshpkt_get_string(ssh, &oidv, &oidlen)) != 0) in input_gssapi_response()
929 userauth(ssh, NULL); in input_gssapi_response()
936 if ((r = sshpkt_get_end(ssh)) != 0) in input_gssapi_response()
939 if (GSS_ERROR(process_gssapi_token(ssh, GSS_C_NO_BUFFER))) { in input_gssapi_response()
942 userauth(ssh, NULL); in input_gssapi_response()
954 input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_token() argument
956 Authctxt *authctxt = ssh->authctxt; in input_gssapi_token()
966 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_token()
967 (r = sshpkt_get_end(ssh)) != 0) in input_gssapi_token()
972 status = process_gssapi_token(ssh, &recv_tok); in input_gssapi_token()
976 userauth(ssh, NULL); in input_gssapi_token()
987 input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_errtok() argument
989 Authctxt *authctxt = ssh->authctxt; in input_gssapi_errtok()
1002 if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || in input_gssapi_errtok()
1003 (r = sshpkt_get_end(ssh)) != 0) { in input_gssapi_errtok()
1022 input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_error() argument
1028 if ((r = sshpkt_get_u32(ssh, NULL)) != 0 || /* maj */ in input_gssapi_error()
1029 (r = sshpkt_get_u32(ssh, NULL)) != 0 || /* min */ in input_gssapi_error()
1030 (r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 || in input_gssapi_error()
1031 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_gssapi_error()
1033 r = sshpkt_get_end(ssh); in input_gssapi_error()
1043 userauth_none(struct ssh *ssh) in userauth_none() argument
1045 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_none()
1049 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_none()
1050 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_none()
1051 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_none()
1052 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_none()
1053 (r = sshpkt_send(ssh)) != 0) in userauth_none()
1059 userauth_passwd(struct ssh *ssh) in userauth_passwd() argument
1061 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_passwd()
1075 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_passwd()
1076 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_passwd()
1077 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_passwd()
1078 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_passwd()
1079 (r = sshpkt_put_u8(ssh, 0)) != 0 || in userauth_passwd()
1080 (r = sshpkt_put_cstring(ssh, password)) != 0 || in userauth_passwd()
1081 (r = sshpkt_add_padding(ssh, 64)) != 0 || in userauth_passwd()
1082 (r = sshpkt_send(ssh)) != 0) in userauth_passwd()
1089 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in userauth_passwd()
1100 input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) in input_userauth_passwd_changereq() argument
1102 Authctxt *authctxt = ssh->authctxt; in input_userauth_passwd_changereq()
1115 if ((r = sshpkt_get_cstring(ssh, &info, NULL)) != 0 || in input_userauth_passwd_changereq()
1116 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_passwd_changereq()
1120 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in input_userauth_passwd_changereq()
1121 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in input_userauth_passwd_changereq()
1122 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in input_userauth_passwd_changereq()
1123 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in input_userauth_passwd_changereq()
1124 (r = sshpkt_put_u8(ssh, 1)) != 0) /* additional info */ in input_userauth_passwd_changereq()
1131 if ((r = sshpkt_put_cstring(ssh, password)) != 0) in input_userauth_passwd_changereq()
1157 if ((r = sshpkt_put_cstring(ssh, password)) != 0 || in input_userauth_passwd_changereq()
1158 (r = sshpkt_add_padding(ssh, 64)) != 0 || in input_userauth_passwd_changereq()
1159 (r = sshpkt_send(ssh)) != 0) in input_userauth_passwd_changereq()
1162 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, in input_userauth_passwd_changereq()
1181 key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) in key_sig_algorithm() argument
1191 if (ssh == NULL || ssh->kex->server_sig_algs == NULL || in key_sig_algorithm()
1193 (key->type == KEY_RSA_CERT && (ssh->compat & SSH_BUG_SIGTYPE))) { in key_sig_algorithm()
1203 server_sig_algs = ssh->kex->server_sig_algs; in key_sig_algorithm()
1204 if (key->type == KEY_RSA && (ssh->compat & SSH_BUG_SIGTYPE74)) in key_sig_algorithm()
1338 sign_and_send_pubkey(struct ssh *ssh, Identity *id) in sign_and_send_pubkey() argument
1340 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in sign_and_send_pubkey()
1411 if ((alg = key_sig_algorithm(fallback_sigtype ? NULL : ssh, in sign_and_send_pubkey()
1421 if (ssh->compat & SSH_OLD_SESSIONID) { in sign_and_send_pubkey()
1422 if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1426 ssh->kex->session_id)) != 0) in sign_and_send_pubkey()
1442 sshbuf_ptr(b), sshbuf_len(b), ssh->compat, alg); in sign_and_send_pubkey()
1477 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in sign_and_send_pubkey()
1478 (r = sshpkt_putb(ssh, b)) != 0 || in sign_and_send_pubkey()
1479 (r = sshpkt_send(ssh)) != 0) in sign_and_send_pubkey()
1494 send_pubkey_test(struct ssh *ssh, Identity *id) in send_pubkey_test() argument
1496 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in send_pubkey_test()
1503 if ((alg = key_sig_algorithm(ssh, id->key)) == NULL) { in send_pubkey_test()
1514 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok); in send_pubkey_test()
1516 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in send_pubkey_test()
1517 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in send_pubkey_test()
1518 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in send_pubkey_test()
1519 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in send_pubkey_test()
1520 (r = sshpkt_put_u8(ssh, have_sig)) != 0 || in send_pubkey_test()
1521 (r = sshpkt_put_cstring(ssh, alg)) != 0 || in send_pubkey_test()
1522 (r = sshpkt_put_string(ssh, blob, bloblen)) != 0 || in send_pubkey_test()
1523 (r = sshpkt_send(ssh)) != 0) in send_pubkey_test()
1792 pubkey_cleanup(struct ssh *ssh) in pubkey_cleanup() argument
1794 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in pubkey_cleanup()
1820 try_identity(struct ssh *ssh, Identity *id) in try_identity() argument
1825 (ssh->compat & SSH_BUG_RSASIGMD5) != 0) { in try_identity()
1834 userauth_pubkey(struct ssh *ssh) in userauth_pubkey() argument
1836 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_pubkey()
1853 if (try_identity(ssh, id)) { in userauth_pubkey()
1857 sent = send_pubkey_test(ssh, id); in userauth_pubkey()
1863 if (try_identity(ssh, id)) { in userauth_pubkey()
1865 sent = sign_and_send_pubkey(ssh, id); in userauth_pubkey()
1882 userauth_kbdint(struct ssh *ssh) in userauth_kbdint() argument
1884 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_kbdint()
1892 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, NULL); in userauth_kbdint()
1897 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_kbdint()
1898 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_kbdint()
1899 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_kbdint()
1900 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_kbdint()
1901 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* lang */ in userauth_kbdint()
1902 (r = sshpkt_put_cstring(ssh, options.kbd_interactive_devices ? in userauth_kbdint()
1904 (r = sshpkt_send(ssh)) != 0) in userauth_kbdint()
1907 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_REQUEST, &input_userauth_info_req); in userauth_kbdint()
1915 input_userauth_info_req(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_req() argument
1917 Authctxt *authctxt = ssh->authctxt; in input_userauth_info_req()
1931 if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0 || in input_userauth_info_req()
1932 (r = sshpkt_get_cstring(ssh, &inst, NULL)) != 0 || in input_userauth_info_req()
1933 (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0) in input_userauth_info_req()
1940 if ((r = sshpkt_get_u32(ssh, &num_prompts)) != 0) in input_userauth_info_req()
1948 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE)) != 0 || in input_userauth_info_req()
1949 (r = sshpkt_put_u32(ssh, num_prompts)) != 0) in input_userauth_info_req()
1954 if ((r = sshpkt_get_cstring(ssh, &prompt, NULL)) != 0 || in input_userauth_info_req()
1955 (r = sshpkt_get_u8(ssh, &echo)) != 0) in input_userauth_info_req()
1962 if ((r = sshpkt_put_cstring(ssh, response)) != 0) in input_userauth_info_req()
1970 if ((r = sshpkt_get_end(ssh)) != 0 || in input_userauth_info_req()
1971 (r = sshpkt_add_padding(ssh, 64)) != 0) in input_userauth_info_req()
1973 r = sshpkt_send(ssh); in input_userauth_info_req()
1986 ssh_keysign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp, in ssh_keysign() argument
1993 int sock = ssh_packet_get_connection_in(ssh); in ssh_keysign()
2101 userauth_hostbased(struct ssh *ssh) in userauth_hostbased() argument
2103 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in userauth_hostbased()
2165 lname = get_local_name(ssh_packet_get_connection_in(ssh)); in userauth_hostbased()
2184 if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 || in userauth_hostbased()
2200 if ((r = ssh_keysign(ssh, private, &sig, &siglen, in userauth_hostbased()
2206 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || in userauth_hostbased()
2207 (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || in userauth_hostbased()
2208 (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || in userauth_hostbased()
2209 (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || in userauth_hostbased()
2210 (r = sshpkt_put_cstring(ssh, authctxt->active_ktype)) != 0 || in userauth_hostbased()
2211 (r = sshpkt_put_string(ssh, keyblob, keylen)) != 0 || in userauth_hostbased()
2212 (r = sshpkt_put_cstring(ssh, chost)) != 0 || in userauth_hostbased()
2213 (r = sshpkt_put_cstring(ssh, authctxt->local_user)) != 0 || in userauth_hostbased()
2214 (r = sshpkt_put_string(ssh, sig, siglen)) != 0 || in userauth_hostbased()
2215 (r = sshpkt_send(ssh)) != 0) { in userauth_hostbased()