/openbsd/usr.bin/ssh/ |
H A D | packet.h | 46 struct ssh { struct 169 int sshpkt_start(struct ssh *ssh, u_char type); 170 int sshpkt_send(struct ssh *ssh); 181 int sshpkt_put_u8(struct ssh *ssh, u_char val); 182 int sshpkt_put_u32(struct ssh *ssh, u_int32_t val); 183 int sshpkt_put_u64(struct ssh *ssh, u_int64_t val); 185 int sshpkt_put_cstring(struct ssh *ssh, const void *v); 191 int sshpkt_get_u8(struct ssh *ssh, u_char *valp); 192 int sshpkt_get_u32(struct ssh *ssh, u_int32_t *valp); 193 int sshpkt_get_u64(struct ssh *ssh, u_int64_t *valp); [all …]
|
H A D | serverloop.c | 101 client_alive_check(struct ssh *ssh) in client_alive_check() argument 139 wait_until_can_do_something(struct ssh *ssh, in wait_until_can_do_something() argument 253 process_input(struct ssh *ssh, int connection_in) in process_input() argument 268 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), in process_input() 279 process_output(struct ssh *ssh, int connection_out) in process_output() argument 291 process_buffered_input_packets(struct ssh *ssh) in process_buffered_input_packets() argument 297 collect_children(struct ssh *ssh) in collect_children() argument 313 server_loop2(struct ssh *ssh, Authctxt *authctxt) in server_loop2() argument 478 server_request_tun(struct ssh *ssh) in server_request_tun() argument 542 server_request_session(struct ssh *ssh) in server_request_session() argument [all …]
|
H A D | packet.c | 212 struct ssh *ssh = NULL; in ssh_alloc_session_state() local 325 ssh_packet_set_mux(struct ssh *ssh) in ssh_packet_set_mux() argument 334 ssh_packet_get_mux(struct ssh *ssh) in ssh_packet_get_mux() argument 495 ssh_remote_ipaddr(struct ssh *ssh) in ssh_remote_ipaddr() argument 608 ssh_remote_port(struct ssh *ssh) in ssh_remote_port() argument 620 ssh_local_ipaddr(struct ssh *ssh) in ssh_local_ipaddr() argument 629 ssh_local_port(struct ssh *ssh) in ssh_local_port() argument 719 ssh_packet_close(struct ssh *ssh) in ssh_packet_close() argument 1485 ssh_packet_read(struct ssh *ssh) in ssh_packet_read() argument 2699 sshpkt_get_end(struct ssh *ssh) in sshpkt_get_end() argument [all …]
|
H A D | ssh_api.c | 87 struct ssh *ssh; in ssh_init() local 156 ssh_free(struct ssh *ssh) in ssh_free() argument 169 if (ssh->kex && ssh->kex->server) in ssh_free() 188 ssh_get_app_data(struct ssh *ssh) in ssh_get_app_data() argument 247 ssh_packet_next(struct ssh *ssh, u_char *typep) in ssh_packet_next() argument 306 ssh_output_ptr(struct ssh *ssh, size_t *len) in ssh_output_ptr() argument 315 ssh_output_consume(struct ssh *ssh, size_t len) in ssh_output_consume() argument 321 ssh_output_space(struct ssh *ssh, size_t len) in ssh_output_space() argument 327 ssh_input_space(struct ssh *ssh, size_t len) in ssh_input_space() argument 437 _ssh_exchange_banner(struct ssh *ssh) in _ssh_exchange_banner() argument [all …]
|
H A D | channels.h | 85 struct ssh; 276 void channel_init_channels(struct ssh *ssh); 280 Channel *channel_by_id(struct ssh *, int); 288 void channel_free_all(struct ssh *); 309 void channel_clear_timeouts(struct ssh *); 334 int channel_output_poll(struct ssh *); 337 void channel_close_all(struct ssh *); 339 int channel_tty_open(struct ssh *); 341 char *channel_open_message(struct ssh *); 342 int channel_find_open(struct ssh *); [all …]
|
H A D | auth2-gss.c | 51 static int input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh); 52 static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh); 53 static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh); 61 userauth_gssapi(struct ssh *ssh, const char *method) in userauth_gssapi() argument 141 input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_token() argument 169 if ((r = sshpkt_start(ssh, in input_gssapi_token() 181 if ((r = sshpkt_start(ssh, in input_gssapi_token() 194 ssh_dispatch_set(ssh, in input_gssapi_token() 205 input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_errtok() argument 249 input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh) in input_gssapi_exchange_complete() argument [all …]
|
H A D | dispatch.c | 38 dispatch_protocol_error(int type, u_int32_t seq, struct ssh *ssh) in dispatch_protocol_error() argument 52 dispatch_protocol_ignore(int type, u_int32_t seq, struct ssh *ssh) in dispatch_protocol_ignore() argument 59 ssh_dispatch_init(struct ssh *ssh, dispatch_fn *dflt) in ssh_dispatch_init() argument 63 ssh->dispatch[i] = dflt; in ssh_dispatch_init() 67 ssh_dispatch_range(struct ssh *ssh, u_int from, u_int to, dispatch_fn *fn) in ssh_dispatch_range() argument 74 ssh->dispatch[i] = fn; in ssh_dispatch_range() 79 ssh_dispatch_set(struct ssh *ssh, int type, dispatch_fn *fn) in ssh_dispatch_set() argument 81 ssh->dispatch[type] = fn; in ssh_dispatch_set() 85 ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done) in ssh_dispatch_run() argument 110 r = (*ssh->dispatch[type])(type, seqnr, ssh); in ssh_dispatch_run() [all …]
|
H A D | ssh_api.h | 47 void ssh_free(struct ssh *); 63 int ssh_add_hostkey(struct ssh *ssh, struct sshkey *key); 71 int ssh_set_verify_host_key_callback(struct ssh *ssh, 88 int ssh_packet_next(struct ssh *ssh, u_char *typep); 95 const u_char *ssh_packet_payload(struct ssh *ssh, size_t *lenp); 102 int ssh_packet_put(struct ssh *ssh, int type, const u_char *data, 109 int ssh_input_space(struct ssh *ssh, size_t len); 114 int ssh_input_append(struct ssh *ssh, const u_char *data, size_t len); 120 int ssh_output_space(struct ssh *ssh, size_t len); 128 const u_char *ssh_output_ptr(struct ssh *ssh, size_t *len); [all …]
|
H A D | channels.c | 223 channel_init_channels(struct ssh *ssh) in channel_init_channels() argument 238 channel_by_id(struct ssh *ssh, int id) in channel_by_id() argument 273 channel_lookup(struct ssh *ssh, int id) in channel_lookup() argument 323 channel_clear_timeouts(struct ssh *ssh) in channel_clear_timeouts() argument 788 channel_free_all(struct ssh *ssh) in channel_free_all() argument 821 channel_close_all(struct ssh *ssh) in channel_close_all() argument 883 channel_still_open(struct ssh *ssh) in channel_still_open() argument 926 channel_tty_open(struct ssh *ssh) in channel_tty_open() argument 943 channel_find_open(struct ssh *ssh) in channel_find_open() argument 1025 channel_open_message(struct ssh *ssh) in channel_open_message() argument [all …]
|
H A D | nchan.c | 111 chan_read_failed(struct ssh *ssh, Channel *c) in chan_read_failed() argument 127 chan_ibuf_empty(struct ssh *ssh, Channel *c) in chan_ibuf_empty() argument 149 chan_obuf_empty(struct ssh *ssh, Channel *c) in chan_obuf_empty() argument 170 chan_rcvd_eow(struct ssh *ssh, Channel *c) in chan_rcvd_eow() argument 182 chan_send_eof2(struct ssh *ssh, Channel *c) in chan_send_eof2() argument 205 chan_send_close2(struct ssh *ssh, Channel *c) in chan_send_close2() argument 228 chan_send_eow2(struct ssh *ssh, Channel *c) in chan_send_eow2() argument 253 chan_rcvd_ieof(struct ssh *ssh, Channel *c) in chan_rcvd_ieof() argument 266 chan_rcvd_oclose(struct ssh *ssh, Channel *c) in chan_rcvd_oclose() argument 306 chan_write_failed(struct ssh *ssh, Channel *c) in chan_write_failed() argument [all …]
|
H A D | sshconnect2.c | 336 int (*userauth)(struct ssh *ssh); 337 void (*cleanup)(struct ssh *ssh); 516 userauth(struct ssh *ssh, char *authlist) in userauth() argument 744 userauth_gssapi(struct ssh *ssh) in userauth_gssapi() argument 800 userauth_gssapi_cleanup(struct ssh *ssh) in userauth_gssapi_cleanup() argument 1008 userauth_none(struct ssh *ssh) in userauth_none() argument 1024 userauth_passwd(struct ssh *ssh) in userauth_passwd() argument 1819 pubkey_cleanup(struct ssh *ssh) in pubkey_cleanup() argument 1847 userauth_pubkey(struct ssh *ssh) in userauth_pubkey() argument 1899 userauth_kbdint(struct ssh *ssh) in userauth_kbdint() argument [all …]
|
H A D | kex.c | 249 kex_reset_dispatch(struct ssh *ssh) in kex_reset_dispatch() argument 331 kex_maybe_send_ext_info(struct ssh *ssh) in kex_maybe_send_ext_info() argument 338 if (!ssh->kex->ext_info_c && !ssh->kex->ext_info_s) in kex_maybe_send_ext_info() 368 kex_server_update_ext_info(struct ssh *ssh) in kex_server_update_ext_info() argument 388 kex_send_newkeys(struct ssh *ssh) in kex_send_newkeys() argument 567 kex_send_kexinit(struct ssh *ssh) in kex_send_kexinit() argument 774 kex_start_rekex(struct ssh *ssh) in kex_start_rekex() argument 921 kex_choose_conf(struct ssh *ssh, uint32_t seq) in kex_choose_conf() argument 1210 send_error(struct ssh *ssh, char *msg) in send_error() argument 1411 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), in kex_exchange_identification() [all …]
|
H A D | clientloop.c | 159 static void client_init_dispatch(struct ssh *ssh); 236 set_control_persist_exit_time(struct ssh *ssh) in set_control_persist_exit_time() argument 451 client_check_window_change(struct ssh *ssh) in client_check_window_change() argument 486 server_alive_check(struct ssh *ssh) in server_alive_check() argument 506 send_chaff(struct ssh *ssh) in send_chaff() argument 780 client_process_net_input(struct ssh *ssh) in client_process_net_input() argument 974 process_cmdline(struct ssh *ssh) in process_cmdline() argument 1160 process_escapes(struct ssh *ssh, Channel *c, in process_escapes() argument 1737 client_request_forwarded_streamlocal(struct ssh *ssh, in client_request_forwarded_streamlocal() argument 2417 client_input_hostkeys(struct ssh *ssh) in client_input_hostkeys() argument [all …]
|
H A D | kexgexs.c | 55 kexgex_server(struct ssh *ssh) in kexgex_server() argument 64 input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh) in input_kex_dh_gex_request() argument 66 struct kex *kex = ssh->kex; in input_kex_dh_gex_request() 74 if ((r = sshpkt_get_u32(ssh, &min)) != 0 || in input_kex_dh_gex_request() 77 (r = sshpkt_get_end(ssh)) != 0) in input_kex_dh_gex_request() 105 (r = sshpkt_send(ssh)) != 0) in input_kex_dh_gex_request() 120 input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh) in input_kex_dh_gex_init() argument 122 struct kex *kex = ssh->kex; in input_kex_dh_gex_init() 142 (r = sshpkt_get_end(ssh)) != 0) in input_kex_dh_gex_init() 186 (r = sshpkt_send(ssh)) != 0) in input_kex_dh_gex_init() [all …]
|
H A D | session.c | 1169 child_close_fds(struct ssh *ssh) in child_close_fds() argument 1573 session_pty_req(struct ssh *ssh, Session *s) in session_pty_req() argument 1667 session_x11_req(struct ssh *ssh, Session *s) in session_x11_req() argument 1703 session_shell_req(struct ssh *ssh, Session *s) in session_shell_req() argument 1716 session_exec_req(struct ssh *ssh, Session *s) in session_exec_req() argument 1734 session_break_req(struct ssh *ssh, Session *s) in session_break_req() argument 1748 session_env_req(struct ssh *ssh, Session *s) in session_env_req() argument 1807 session_signal_req(struct ssh *ssh, Session *s) in session_signal_req() argument 1918 session_set_fds(struct ssh *ssh, Session *s, in session_set_fds() argument 1998 session_close_x11(struct ssh *ssh, int id) in session_close_x11() argument [all …]
|
H A D | auth2-chall.c | 154 auth2_challenge(struct ssh *ssh, char *devs) in auth2_challenge() argument 165 return auth2_challenge_start(ssh); in auth2_challenge() 170 auth2_challenge_stop(struct ssh *ssh) in auth2_challenge_stop() argument 183 auth2_challenge_start(struct ssh *ssh) in auth2_challenge_start() argument 192 auth2_challenge_stop(ssh); in auth2_challenge_start() 199 auth2_challenge_stop(ssh); in auth2_challenge_start() 203 auth2_challenge_stop(ssh); in auth2_challenge_start() 214 send_userauth_info_request(struct ssh *ssh) in send_userauth_info_request() argument 251 input_userauth_info_response(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_info_response() argument 311 auth2_challenge_stop(ssh); in input_userauth_info_response() [all …]
|
H A D | kexgexc.c | 53 kexgex_client(struct ssh *ssh) in kexgex_client() argument 55 struct kex *kex = ssh->kex; in kexgex_client() 71 (r = sshpkt_send(ssh)) != 0) in kexgex_client() 88 input_kex_dh_gex_group(int type, u_int32_t seq, struct ssh *ssh) in input_kex_dh_gex_group() argument 90 struct kex *kex = ssh->kex; in input_kex_dh_gex_group() 100 (r = sshpkt_get_end(ssh)) != 0) in input_kex_dh_gex_group() 119 (r = sshpkt_send(ssh)) != 0) in input_kex_dh_gex_group() 138 input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh) in input_kex_dh_gex_reply() argument 140 struct kex *kex = ssh->kex; in input_kex_dh_gex_reply() 168 (r = sshpkt_get_end(ssh)) != 0) in input_kex_dh_gex_reply() [all …]
|
H A D | kexgen.c | 42 static int input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh); 96 kex_gen_client(struct ssh *ssh) in kex_gen_client() argument 98 struct kex *kex = ssh->kex; in kex_gen_client() 128 (r = sshpkt_send(ssh)) != 0) in kex_gen_client() 136 input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh) in input_kex_gen_reply() argument 138 struct kex *kex = ssh->kex; in input_kex_gen_reply() 168 (r = sshpkt_get_end(ssh)) != 0) in input_kex_gen_reply() 255 kex_gen_server(struct ssh *ssh) in kex_gen_server() argument 263 input_kex_gen_init(int type, u_int32_t seq, struct ssh *ssh) in input_kex_gen_init() argument 265 struct kex *kex = ssh->kex; in input_kex_gen_init() [all …]
|
H A D | auth.h | 40 struct ssh; 106 int (*userauth)(struct ssh *, const char *); 129 int auth_password(struct ssh *, const char *); 133 int user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, 153 void do_authentication2(struct ssh *); 158 int auth_root_allowed(struct ssh *, const char *); 168 int auth2_challenge(struct ssh *, char *); 169 void auth2_challenge_stop(struct ssh *); 173 int allowed_user(struct ssh *, struct passwd *); 198 void auth_restrict_session(struct ssh *); [all …]
|
H A D | auth2.c | 136 userauth_banner(struct ssh *ssh) in userauth_banner() argument 161 do_authentication2(struct ssh *ssh) in do_authentication2() argument 166 if (ssh->kex->ext_info_c) in do_authentication2() 170 ssh->authctxt = NULL; in do_authentication2() 174 input_service_request(int type, u_int32_t seq, struct ssh *ssh) in input_service_request() argument 259 input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) in input_userauth_request() argument 281 auth_maxtries_exceeded(ssh); in input_userauth_request() 300 userauth_banner(ssh); in input_userauth_request() 304 ssh_packet_disconnect(ssh, in input_userauth_request() 313 auth2_challenge_stop(ssh); in input_userauth_request() [all …]
|
H A D | sshd-session.c | 284 privsep_preauth(struct ssh *ssh) in privsep_preauth() argument 351 privsep_postauth(struct ssh *ssh, Authctxt *authctxt) in privsep_postauth() argument 505 get_hostkey_public_by_type(int type, int nid, struct ssh *ssh) in get_hostkey_public_by_type() argument 525 get_hostkey_public_by_index(int ind, struct ssh *ssh) in get_hostkey_public_by_index() argument 560 notify_hostkeys(struct ssh *ssh) in notify_hostkeys() argument 738 check_ip_options(struct ssh *ssh) in check_ip_options() argument 761 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), text); in check_ip_options() 768 set_process_rdomain(struct ssh *ssh, const char *name) in set_process_rdomain() argument 797 struct ssh *ssh = NULL; in main() local 1260 sshd_hostkey_sign(struct ssh *ssh, struct sshkey *privkey, in sshd_hostkey_sign() argument [all …]
|
H A D | clientloop.h | 40 struct ssh; 43 int client_loop(struct ssh *, int, int, int); 44 int client_x11_get_proto(struct ssh *, const char *, const char *, 46 void client_session2_setup(struct ssh *, int, int, int, 48 char *client_request_tun_fwd(struct ssh *, int, int, int, 54 void client_filter_cleanup(struct ssh *, int, void *); 58 typedef void global_confirm_cb(struct ssh *, int, u_int32_t, void *); 63 void client_expect_confirm(struct ssh *, int, const char *, 79 void muxserver_listen(struct ssh *); 81 void mux_exit_message(struct ssh *, Channel *, int); [all …]
|
H A D | kex.h | 131 struct ssh; 167 int (*kex[KEX_MAX])(struct ssh *); 195 int kex_ready(struct ssh *, char *[PROPOSAL_MAX]); 206 int kex_send_kexinit(struct ssh *); 211 int kex_send_newkeys(struct ssh *); 212 int kex_start_rekex(struct ssh *); 213 int kex_server_update_ext_info(struct ssh *); 216 int kexgex_client(struct ssh *); 217 int kexgex_server(struct ssh *); 218 int kex_gen_client(struct ssh *); [all …]
|
/openbsd/regress/usr.bin/ssh/unittests/sshkey/ |
H A D | mktestdata.sh | 112 ssh-keygen -pf rsa_n -N "" 113 ssh-keygen -pf dsa_n -N "" 114 ssh-keygen -pf ecdsa_n -N "" 126 ssh-keygen -pf rsa_1_pw -m PEM -N "$PW" 127 ssh-keygen -pf dsa_1_pw -m PEM -N "$PW" 129 ssh-keygen -pf ed25519_1_pw -N "$PW" 131 ssh-keygen -pf ed25519_sk1_pw -N "$PW" 132 ssh-keygen -pf rsa_n_pw -N "$PW" 133 ssh-keygen -pf dsa_n_pw -N "$PW" 134 ssh-keygen -pf ecdsa_n_pw -N "$PW" [all …]
|
/openbsd/regress/usr.bin/ssh/ |
H A D | Makefile | 122 host.ssh-dss host.ssh-ed25519 host.ssh-rsa \ 131 sftp-server.sh sftp.log ssh-log-wrapper.sh ssh.log \ 132 ssh-agent.log ssh-add.log slow-sftp-server.sh \ 159 ssh-keygen -if /dev/stdin |\ 171 set -xe ; if ssh -Q key | grep -q ^ssh-dss ; then \ 182 ssh-keygen -lf t7.out > /dev/null 183 ssh-keygen -Bf t7.out > /dev/null 186 set -xe ; if ssh -Q key | grep -q ^ssh-dss ; then \ 191 set -xe ; if ssh -Q key | grep -q ^ssh-dss ; then \ 200 ssh-keygen -lf t9.out > /dev/null [all …]
|