| /freebsd/crypto/openssh/ |
| H A D | packet.h | 54 struct ssh { struct 93 typedef int (ssh_packet_hook_fn)(struct ssh *, struct sshbuf *, argument 96 struct ssh *ssh_alloc_session_state(void); 97 struct ssh *ssh_packet_set_connection(struct ssh *, int, int); 98 void ssh_packet_set_timeout(struct ssh *, int, int); 99 int ssh_packet_stop_discard(struct ssh *); 100 int ssh_packet_connection_af(struct ssh *); 101 void ssh_packet_set_nonblocking(struct ssh *); 102 int ssh_packet_get_connection_in(struct ssh *); 103 int ssh_packet_get_connection_out(struct ssh *); [all …]
|
| H A D | packet.c | 13 * called by a name other than "ssh" or "Secure Shell". 95 #include "ssh.h" 229 struct ssh * 232 struct ssh *ssh = NULL; in ssh_alloc_session_state() 235 if ((ssh = calloc(1, sizeof(*ssh))) == NULL || in ssh_alloc_session_state() 237 (ssh->kex = kex_new()) == NULL || in ssh_alloc_session_state() 244 TAILQ_INIT(&ssh->private_keys); in ssh_alloc_session_state() 245 TAILQ_INIT(&ssh in ssh_alloc_session_state() 233 struct ssh *ssh = NULL; ssh_alloc_session_state() local 276 ssh_packet_set_input_hook(struct ssh * ssh,ssh_packet_hook_fn * hook,void * ctx) ssh_packet_set_input_hook() argument 284 ssh_packet_is_rekeying(struct ssh * ssh) ssh_packet_is_rekeying() argument 294 ssh_packet_set_connection(struct ssh * ssh,int fd_in,int fd_out) ssh_packet_set_connection() argument 331 ssh_packet_set_timeout(struct ssh * ssh,int timeout,int count) ssh_packet_set_timeout() argument 346 ssh_packet_set_mux(struct ssh * ssh) ssh_packet_set_mux() argument 355 ssh_packet_get_mux(struct ssh * ssh) ssh_packet_get_mux() argument 361 ssh_packet_set_log_preamble(struct ssh * ssh,const char * fmt,...) ssh_packet_set_log_preamble() argument 380 ssh_packet_stop_discard(struct ssh * ssh) ssh_packet_stop_discard() argument 407 ssh_packet_start_discard(struct ssh * ssh,struct sshenc * enc,struct sshmac * mac,size_t mac_already,u_int discard) ssh_packet_start_discard() argument 435 ssh_packet_connection_is_on_socket(struct ssh * ssh) ssh_packet_connection_is_on_socket() argument 468 ssh_packet_get_bytes(struct ssh * ssh,u_int64_t * ibytes,u_int64_t * obytes) ssh_packet_get_bytes() argument 477 ssh_packet_connection_af(struct ssh * ssh) ssh_packet_connection_af() argument 485 ssh_packet_set_nonblocking(struct ssh * ssh) ssh_packet_set_nonblocking() argument 497 ssh_packet_get_connection_in(struct ssh * ssh) ssh_packet_get_connection_in() argument 505 ssh_packet_get_connection_out(struct ssh * ssh) ssh_packet_get_connection_out() argument 516 ssh_remote_ipaddr(struct ssh * ssh) ssh_remote_ipaddr() argument 548 ssh_remote_hostname(struct ssh * ssh) ssh_remote_hostname() argument 633 ssh_remote_port(struct ssh * ssh) ssh_remote_port() argument 645 ssh_local_ipaddr(struct ssh * ssh) ssh_local_ipaddr() argument 654 ssh_local_port(struct ssh * ssh) ssh_local_port() argument 662 ssh_packet_rdomain_in(struct ssh * ssh) ssh_packet_rdomain_in() argument 675 ssh_packet_close_internal(struct ssh * ssh,int do_close) ssh_packet_close_internal() argument 744 ssh_packet_close(struct ssh * ssh) ssh_packet_close() argument 750 ssh_packet_clear_keys(struct ssh * ssh) ssh_packet_clear_keys() argument 758 ssh_packet_set_protocol_flags(struct ssh * ssh,u_int protocol_flags) ssh_packet_set_protocol_flags() argument 766 ssh_packet_get_protocol_flags(struct ssh * ssh) ssh_packet_get_protocol_flags() argument 777 ssh_packet_init_compression(struct ssh * ssh) ssh_packet_init_compression() argument 787 start_compression_out(struct ssh * ssh,int level) start_compression_out() argument 807 start_compression_in(struct ssh * ssh) start_compression_in() argument 825 compress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) compress_buffer() argument 871 uncompress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) uncompress_buffer() argument 920 start_compression_out(struct ssh * ssh,int level) start_compression_out() argument 926 start_compression_in(struct ssh * ssh) start_compression_in() argument 932 compress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) compress_buffer() argument 938 uncompress_buffer(struct ssh * ssh,struct sshbuf * in,struct sshbuf * out) uncompress_buffer() argument 945 ssh_clear_newkeys(struct ssh * ssh,int mode) ssh_clear_newkeys() argument 954 ssh_set_newkeys(struct ssh * ssh,int mode) ssh_set_newkeys() argument 1051 ssh_packet_need_rekeying(struct ssh * ssh,u_int outbound_packet_len) ssh_packet_need_rekeying() argument 1098 ssh_packet_check_rekey(struct ssh * ssh) ssh_packet_check_rekey() argument 1112 ssh_packet_enable_delayed_compress(struct ssh * ssh) ssh_packet_enable_delayed_compress() argument 1164 ssh_packet_send2_wrapped(struct ssh * ssh) ssh_packet_send2_wrapped() argument 1344 ssh_packet_send2(struct ssh * ssh) ssh_packet_send2() argument 1428 ssh_packet_read_seqnr(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_seqnr() argument 1510 ssh_packet_read(struct ssh * ssh) ssh_packet_read() argument 1521 ssh_packet_read_poll2_mux(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_poll2_mux() argument 1559 ssh_packet_read_poll2(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_poll2() argument 1797 ssh_packet_read_poll_seqnr(struct ssh * ssh,u_char * typep,u_int32_t * seqnr_p) ssh_packet_read_poll_seqnr() argument 1898 ssh_packet_process_incoming(struct ssh * ssh,const char * buf,u_int len) ssh_packet_process_incoming() argument 1920 ssh_packet_process_read(struct ssh * ssh,int fd) ssh_packet_process_read() argument 1944 ssh_packet_remaining(struct ssh * ssh) ssh_packet_remaining() argument 1958 ssh_packet_send_debug(struct ssh * ssh,const char * fmt,...) ssh_packet_send_debug() argument 1983 sshpkt_fmt_connection_id(struct ssh * ssh,char * s,size_t l) sshpkt_fmt_connection_id() argument 1995 sshpkt_vfatal(struct ssh * ssh,int r,const char * fmt,va_list ap) sshpkt_vfatal() argument 2047 sshpkt_fatal(struct ssh * ssh,int r,const char * fmt,...) sshpkt_fatal() argument 2065 ssh_packet_disconnect(struct ssh * ssh,const char * fmt,...) ssh_packet_disconnect() argument 2108 ssh_packet_write_poll(struct ssh * ssh) ssh_packet_write_poll() argument 2136 ssh_packet_write_wait(struct ssh * ssh) ssh_packet_write_wait() argument 2183 ssh_packet_have_data_to_write(struct ssh * ssh) ssh_packet_have_data_to_write() argument 2191 ssh_packet_not_very_much_data_to_write(struct ssh * ssh) ssh_packet_not_very_much_data_to_write() argument 2205 ssh_packet_interactive_data_to_write(struct ssh * ssh) ssh_packet_interactive_data_to_write() argument 2212 ssh_packet_set_tos(struct ssh * ssh,int tos) ssh_packet_set_tos() argument 2222 ssh_packet_set_interactive(struct ssh * ssh,int interactive,int qos_interactive,int qos_bulk) ssh_packet_set_interactive() argument 2243 ssh_packet_is_interactive(struct ssh * ssh) ssh_packet_is_interactive() argument 2249 ssh_packet_set_maxsize(struct ssh * ssh,u_int s) ssh_packet_set_maxsize() argument 2269 ssh_packet_inc_alive_timeouts(struct ssh * ssh) ssh_packet_inc_alive_timeouts() argument 2275 ssh_packet_set_alive_timeouts(struct ssh * ssh,int ka) ssh_packet_set_alive_timeouts() argument 2281 ssh_packet_get_maxsize(struct ssh * ssh) ssh_packet_get_maxsize() argument 2287 ssh_packet_set_rekey_limits(struct ssh * ssh,u_int64_t bytes,u_int32_t seconds) ssh_packet_set_rekey_limits() argument 2296 ssh_packet_get_rekey_timeout(struct ssh * ssh) ssh_packet_get_rekey_timeout() argument 2306 ssh_packet_set_server(struct ssh * ssh) ssh_packet_set_server() argument 2313 ssh_packet_set_authenticated(struct ssh * ssh) ssh_packet_set_authenticated() argument 2319 ssh_packet_get_input(struct ssh * ssh) ssh_packet_get_input() argument 2325 ssh_packet_get_output(struct ssh * ssh) ssh_packet_get_output() argument 2332 ssh_packet_set_postauth(struct ssh * ssh) ssh_packet_set_postauth() argument 2371 newkeys_to_blob(struct sshbuf * m,struct ssh * ssh,int mode) newkeys_to_blob() argument 2415 ssh_packet_get_state(struct ssh * ssh,struct sshbuf * m) ssh_packet_get_state() argument 2442 newkeys_from_blob(struct sshbuf * m,struct ssh * ssh,int mode) newkeys_from_blob() argument 2549 ssh_packet_set_state(struct ssh * ssh,struct sshbuf * m) ssh_packet_set_state() argument 2602 sshpkt_put(struct ssh * ssh,const void * v,size_t len) sshpkt_put() argument 2608 sshpkt_putb(struct ssh * ssh,const struct sshbuf * b) sshpkt_putb() argument 2614 sshpkt_put_u8(struct ssh * ssh,u_char val) sshpkt_put_u8() argument 2620 sshpkt_put_u32(struct ssh * ssh,u_int32_t val) sshpkt_put_u32() argument 2626 sshpkt_put_u64(struct ssh * ssh,u_int64_t val) sshpkt_put_u64() argument 2632 sshpkt_put_string(struct ssh * ssh,const void * v,size_t len) sshpkt_put_string() argument 2638 sshpkt_put_cstring(struct ssh * ssh,const void * v) sshpkt_put_cstring() argument 2644 sshpkt_put_stringb(struct ssh * ssh,const struct sshbuf * v) sshpkt_put_stringb() argument 2652 sshpkt_put_ec(struct ssh * ssh,const EC_POINT * v,const EC_GROUP * g) sshpkt_put_ec() argument 2658 sshpkt_put_ec_pkey(struct ssh * ssh,EVP_PKEY * pkey) sshpkt_put_ec_pkey() argument 2665 sshpkt_put_bignum2(struct ssh * ssh,const BIGNUM * v) sshpkt_put_bignum2() argument 2674 sshpkt_get(struct ssh * ssh,void * valp,size_t len) sshpkt_get() argument 2680 sshpkt_get_u8(struct ssh * ssh,u_char * valp) sshpkt_get_u8() argument 2686 sshpkt_get_u32(struct ssh * ssh,u_int32_t * valp) sshpkt_get_u32() argument 2692 sshpkt_get_u64(struct ssh * ssh,u_int64_t * valp) sshpkt_get_u64() argument 2698 sshpkt_get_string(struct ssh * ssh,u_char ** valp,size_t * lenp) sshpkt_get_string() argument 2704 sshpkt_get_string_direct(struct ssh * ssh,const u_char ** valp,size_t * lenp) sshpkt_get_string_direct() argument 2710 sshpkt_peek_string_direct(struct ssh * ssh,const u_char ** valp,size_t * lenp) sshpkt_peek_string_direct() argument 2716 sshpkt_get_cstring(struct ssh * ssh,char ** valp,size_t * lenp) sshpkt_get_cstring() argument 2722 sshpkt_getb_froms(struct ssh * ssh,struct sshbuf ** valp) sshpkt_getb_froms() argument 2730 sshpkt_get_ec(struct ssh * ssh,EC_POINT * v,const EC_GROUP * g) sshpkt_get_ec() argument 2737 sshpkt_get_bignum2(struct ssh * ssh,BIGNUM ** valp) sshpkt_get_bignum2() argument 2744 sshpkt_get_end(struct ssh * ssh) sshpkt_get_end() argument 2752 sshpkt_ptr(struct ssh * ssh,size_t * lenp) sshpkt_ptr() argument 2762 sshpkt_start(struct ssh * ssh,u_char type) sshpkt_start() argument 2774 ssh_packet_send_mux(struct ssh * ssh) ssh_packet_send_mux() argument 2815 sshpkt_msg_ignore(struct ssh * ssh,u_int nbytes) sshpkt_msg_ignore() argument 2837 sshpkt_send(struct ssh * ssh) sshpkt_send() argument 2845 sshpkt_disconnect(struct ssh * ssh,const char * fmt,...) sshpkt_disconnect() argument 2867 sshpkt_add_padding(struct ssh * ssh,u_char pad) sshpkt_add_padding() argument [all...] |
| H A D | serverloop.c | 95 static void server_init_dispatch(struct ssh *); 107 client_alive_check(struct ssh *ssh) in client_alive_check() argument 114 ssh_packet_inc_alive_timeouts(ssh) > in client_alive_check() 116 sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); in client_alive_check() 125 if ((channel_id = channel_find_open(ssh)) == -1) { in client_alive_check() 126 if ((r = sshpkt_start(ssh, SSH2_MSG_GLOBAL_REQUEST)) != 0 || in client_alive_check() 127 (r = sshpkt_put_cstring(ssh, "keepalive@openssh.com")) in client_alive_check() 129 (r = sshpkt_put_u8(ssh, 1)) != 0) /* boolean: want reply */ in client_alive_check() 132 channel_request_start(ssh, channel_id, in client_alive_check() 135 if ((r = sshpkt_send(ssh)) != 0) in client_alive_check() [all …]
|
| H A D | ssh_api.c | 42 int _ssh_exchange_banner(struct ssh *); 43 int _ssh_send_banner(struct ssh *, struct sshbuf *); 44 int _ssh_read_banner(struct ssh *, struct sshbuf *); 45 int _ssh_order_hostkeyalgs(struct ssh *); 46 int _ssh_verify_host_key(struct sshkey *, struct ssh *); 47 struct sshkey *_ssh_host_public_key(int, int, struct ssh *); 48 struct sshkey *_ssh_host_private_key(int, int, struct ssh *); 49 int _ssh_host_key_sign(struct ssh *, struct sshkey *, struct sshkey *, 87 ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params) in ssh_init() 91 struct ssh *ssh; in ssh_init() local [all …]
|
| H A D | channels.h | 85 struct ssh; 89 typedef void channel_open_fn(struct ssh *, int, int, void *); 90 typedef void channel_callback_fn(struct ssh *, int, int, void *); 91 typedef int channel_infilter_fn(struct ssh *, struct Channel *, char *, int); 92 typedef void channel_filter_cleanup_fn(struct ssh *, int, void *); 93 typedef u_char *channel_outfilter_fn(struct ssh *, struct Channel *, 97 typedef void channel_confirm_cb(struct ssh *, int, struct Channel *, void *); 98 typedef void channel_confirm_abandon_cb(struct ssh *, struct Channel *, void *); 115 typedef int mux_callback_fn(struct ssh *, struct Channel *); 281 void channel_init_channels(struct ssh *ssh); [all …]
|
| H A D | auth2-gss.c | 56 static int input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh); 57 static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh); 58 static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh); 59 static int input_gssapi_errtok(int, u_int32_t, struct ssh *); 66 userauth_gssapi(struct ssh *ssh, const char *method) in userauth_gssapi() argument 68 Authctxt *authctxt = ssh->authctxt; in userauth_gssapi() 77 if ((r = sshpkt_get_u32(ssh, &mechs)) != 0) in userauth_gssapi() 95 if ((r = sshpkt_get_string(ssh, &doid, &len)) != 0) in userauth_gssapi() 131 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_GSSAPI_RESPONSE)) != 0 || in userauth_gssapi() 132 (r = sshpkt_put_string(ssh, doid, len)) != 0 || in userauth_gssapi() [all …]
|
| H A D | dispatch.c | 40 dispatch_protocol_error(int type, u_int32_t seq, struct ssh *ssh) in dispatch_protocol_error() argument 45 if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || in dispatch_protocol_error() 46 (r = sshpkt_put_u32(ssh, seq)) != 0 || in dispatch_protocol_error() 47 (r = sshpkt_send(ssh)) != 0 || in dispatch_protocol_error() 48 (r = ssh_packet_write_wait(ssh)) != 0) in dispatch_protocol_error() 49 sshpkt_fatal(ssh, r, "%s", __func__); in dispatch_protocol_error() 54 dispatch_protocol_ignore(int type, u_int32_t seq, struct ssh *ssh) in dispatch_protocol_ignore() argument 61 ssh_dispatch_init(struct ssh *ssh, dispatch_fn *dflt) in ssh_dispatch_init() argument 65 ssh->dispatch[i] = dflt; in ssh_dispatch_init() 69 ssh_dispatch_range(struct ssh *ssh, u_int from, u_int to, dispatch_fn *fn) in ssh_dispatch_range() argument [all …]
|
| H A D | nchan.c | 77 static void chan_send_eof2(struct ssh *, Channel *); 78 static void chan_send_eow2(struct ssh *, Channel *); 81 static void chan_shutdown_write(struct ssh *, Channel *); 82 static void chan_shutdown_read(struct ssh *, Channel *); 83 static void chan_shutdown_extended_read(struct ssh *, Channel *); 113 chan_read_failed(struct ssh *ssh, Channel *c) in chan_read_failed() argument 118 chan_shutdown_read(ssh, c); in chan_read_failed() 129 chan_ibuf_empty(struct ssh *ssh, Channel *c) in chan_ibuf_empty() argument 140 chan_send_eof2(ssh, c); in chan_ibuf_empty() 151 chan_obuf_empty(struct ssh *ssh, Channel *c) in chan_obuf_empty() argument [all …]
|
| H A D | kex.c | 68 static int kex_choose_conf(struct ssh *, uint32_t seq); 69 static int kex_input_newkeys(int, u_int32_t, struct ssh *); 91 kex_proposal_populate_entries(struct ssh *ssh, char *prop[PROPOSAL_MAX], in kex_proposal_populate_entries() argument 97 const char **defprop = ssh->kex->server ? defpropserver : defpropclient; in kex_proposal_populate_entries() 107 if ((cp = kex_names_cat(kexalgos, ssh->kex->server ? in kex_proposal_populate_entries() 115 prop[i] = compat_kex_proposal(ssh, cp); in kex_proposal_populate_entries() 236 kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh) in kex_protocol_error() argument 241 if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) { in kex_protocol_error() 242 ssh_packet_disconnect(ssh, "strict KEX violation: " in kex_protocol_error() 246 if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || in kex_protocol_error() [all …]
|
| H A D | ssh_api.h | 43 int ssh_init(struct ssh **, int is_server, struct kex_params *kex_params); 48 void ssh_free(struct ssh *); 53 void ssh_set_app_data(struct ssh *, void *); 54 void *ssh_get_app_data(struct ssh *); 64 int ssh_add_hostkey(struct ssh *ssh, struct sshkey *key); 72 int ssh_set_verify_host_key_callback(struct ssh *ssh, 73 int (*cb)(struct sshkey *, struct ssh *)); 89 int ssh_packet_next(struct ssh *ssh, u_char *typep); 96 const u_char *ssh_packet_payload(struct ssh *ssh, size_t *lenp); 103 int ssh_packet_put(struct ssh *ssh, int type, const u_char *data, [all …]
|
| H A D | channels.c | 103 typedef void chan_fn(struct ssh *, Channel *c); 218 static void port_open_helper(struct ssh *ssh, Channel *c, char *rtype); 224 static Channel *rdynamic_connect_prepare(struct ssh *, char *, char *); 225 static int rdynamic_connect_finish(struct ssh *, Channel *); 233 channel_init_channels(struct ssh *ssh) in channel_init_channels() argument 244 ssh->chanctxt = sc; in channel_init_channels() 248 channel_by_id(struct ssh *ssh, int id) in channel_by_id() argument 252 if (id < 0 || (u_int)id >= ssh->chanctxt->channels_alloc) { in channel_by_id() 256 c = ssh->chanctxt->channels[id]; in channel_by_id() 265 channel_by_remote_id(struct ssh *ssh, u_int remote_id) in channel_by_remote_id() argument [all …]
|
| H A D | sshconnect2.c | 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() [all …]
|
| H A D | clientloop.c | 168 static void client_init_dispatch(struct ssh *ssh); 245 set_control_persist_exit_time(struct ssh *ssh) in set_control_persist_exit_time() argument 251 } else if (channel_still_open(ssh)) { in set_control_persist_exit_time() 289 client_x11_get_proto(struct ssh *ssh, const char *display, in client_x11_get_proto() argument 384 channel_set_x11_refuse_time(ssh, in client_x11_get_proto() 460 client_check_window_change(struct ssh *ssh) in client_check_window_change() argument 466 channel_send_window_changes(ssh); in client_check_window_change() 470 client_global_request_reply(int type, u_int32_t seq, struct ssh *ssh) in client_global_request_reply() argument 477 gc->cb(ssh, type, seq, gc->ctx); in client_global_request_reply() 483 ssh_packet_set_alive_timeouts(ssh, 0); in client_global_request_reply() [all …]
|
| H A D | kexgexs.c | 58 static int input_kex_dh_gex_request(int, u_int32_t, struct ssh *); 59 static int input_kex_dh_gex_init(int, u_int32_t, struct ssh *); 62 kexgex_server(struct ssh *ssh) in kexgex_server() argument 64 ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST, in kexgex_server() 71 input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh) in input_kex_dh_gex_request() argument 73 struct kex *kex = ssh->kex; in input_kex_dh_gex_request() 79 ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST, &kex_protocol_error); in input_kex_dh_gex_request() 81 if ((r = sshpkt_get_u32(ssh, &min)) != 0 || in input_kex_dh_gex_request() 82 (r = sshpkt_get_u32(ssh, &nbits)) != 0 || in input_kex_dh_gex_request() 83 (r = sshpkt_get_u32(ssh, &max)) != 0 || in input_kex_dh_gex_request() [all …]
|
| H A D | session.c | 126 void session_set_fds(struct ssh *, Session *, int, int, int, int, int); 129 int session_setup_x11fwd(struct ssh *, Session *); 130 int do_exec_pty(struct ssh *, Session *, const char *); 131 int do_exec_no_pty(struct ssh *, Session *, const char *); 132 int do_exec(struct ssh *, Session *, const char *); 133 void do_login(struct ssh *, Session *, const char *); 134 void do_child(struct ssh *, Session *, const char *); 138 static void do_authenticated2(struct ssh *, Authctxt *); 140 static int session_pty_req(struct ssh *, Session *); 195 auth_input_request_forwarding(struct ssh *ssh, struct passwd * pw) in auth_input_request_forwarding() argument [all …]
|
| H A D | kexgexc.c | 56 static int input_kex_dh_gex_group(int, u_int32_t, struct ssh *); 57 static int input_kex_dh_gex_reply(int, u_int32_t, struct ssh *); 60 kexgex_client(struct ssh *ssh) in kexgex_client() argument 62 struct kex *kex = ssh->kex; in kexgex_client() 71 if (ssh->compat & SSH_BUG_DHGEX_LARGE) in kexgex_client() 74 if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST)) != 0 || in kexgex_client() 75 (r = sshpkt_put_u32(ssh, kex->min)) != 0 || in kexgex_client() 76 (r = sshpkt_put_u32(ssh, kex->nbits)) != 0 || in kexgex_client() 77 (r = sshpkt_put_u32(ssh, kex->max)) != 0 || in kexgex_client() 78 (r = sshpkt_send(ssh)) != 0) in kexgex_client() [all …]
|
| H A D | auth2.c | 56 #include "ssh-gss.h" 91 static int input_service_request(int, u_int32_t, struct ssh *); 92 static int input_userauth_request(int, u_int32_t, struct ssh *); 139 userauth_send_banner(struct ssh *ssh, const char *msg) 143 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_BANNER)) != 0 || in userauth_send_banner() 144 (r = sshpkt_put_cstring(ssh, msg)) != 0 || in userauth_send_banner() 145 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language, unused */ in userauth_send_banner() 146 (r = sshpkt_send(ssh)) != 0) in userauth_send_banner() 152 userauth_banner(struct ssh *ss 140 userauth_send_banner(struct ssh * ssh,const char * msg) userauth_send_banner() argument 153 userauth_banner(struct ssh * ssh) userauth_banner() argument 172 do_authentication2(struct ssh * ssh) do_authentication2() argument 185 input_service_request(int type,u_int32_t seq,struct ssh * ssh) input_service_request() argument 270 input_userauth_request(int type,u_int32_t seq,struct ssh * ssh) input_userauth_request() argument 362 userauth_finish(struct ssh * ssh,int authenticated,const char * packet_method,const char * submethod) userauth_finish() argument [all...] |
| H A D | auth2-chall.c | 52 static int auth2_challenge_start(struct ssh *); 53 static int send_userauth_info_request(struct ssh *); 54 static int input_userauth_info_response(int, u_int32_t, struct ssh *); 193 auth2_challenge(struct ssh *ssh, char *devs) in auth2_challenge() argument 195 Authctxt *authctxt = ssh->authctxt; in auth2_challenge() 204 return auth2_challenge_start(ssh); in auth2_challenge() 209 auth2_challenge_stop(struct ssh *ssh) in auth2_challenge_stop() argument 211 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_stop() 213 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); in auth2_challenge_stop() 222 auth2_challenge_start(struct ssh *ssh) in auth2_challenge_start() argument [all …]
|
| H A D | auth.h | 45 struct ssh; 115 int (*userauth)(struct ssh *, const char *); 138 int auth_password(struct ssh *, const char *); 140 int hostbased_key_allowed(struct ssh *, struct passwd *, 142 int user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, 172 void do_authentication2(struct ssh *); 174 void auth_log(struct ssh *, int, int, const char *, const char *); 175 void auth_maxtries_exceeded(struct ssh *) __attribute__((noreturn)); 176 void userauth_finish(struct ssh *, int, const char *, const char *); 177 int auth_root_allowed(struct ssh *, const char *); [all …]
|
| H A D | kexgen.c | 44 static int input_kex_gen_init(int, u_int32_t, struct ssh *); 45 static int input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh); 99 kex_gen_client(struct ssh *ssh) in kex_gen_client() argument 101 struct kex *kex = ssh->kex; in kex_gen_client() 132 if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_ECDH_INIT)) != 0 || in kex_gen_client() 133 (r = sshpkt_put_stringb(ssh, kex->client_pub)) != 0 || in kex_gen_client() 134 (r = sshpkt_send(ssh)) != 0) in kex_gen_client() 137 ssh_dispatch_set(ssh, SSH2_MSG_KEX_ECDH_REPLY, &input_kex_gen_reply); in kex_gen_client() 142 input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh) in input_kex_gen_reply() argument 144 struct kex *kex = ssh->kex; in input_kex_gen_reply() [all …]
|
| H A D | monitor_wrap.h | 33 struct ssh; 45 int mm_sshkey_sign(struct ssh *, struct sshkey *, u_char **, size_t *, 49 struct passwd *mm_getpwnamallow(struct ssh *, const char *); 51 int mm_auth_password(struct ssh *, char *); 54 int mm_user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, int, 56 int mm_hostbased_key_allowed(struct ssh *, struct passwd *, const char *, 61 void mm_decode_activate_server_options(struct ssh *ssh, struct sshbuf *m); 72 void mm_start_pam(struct ssh *ssh); 82 void mm_audit_event(struct ssh *, ssh_audit_event_t); 91 void mm_send_keystate(struct ssh *, struct monitor*); [all …]
|
| H A D | sshd-session.c | 183 struct ssh *the_active_state; 338 privsep_preauth(struct ssh *ssh) in privsep_preauth() argument 346 pmonitor->m_pkex = &ssh->kex; in privsep_preauth() 361 monitor_child_preauth(ssh, pmonitor); in privsep_preauth() 397 if (ssh_packet_get_connection_in(ssh) != STDIN_FILENO && in privsep_preauth() 398 dup2(ssh_packet_get_connection_in(ssh), STDIN_FILENO) == -1) in privsep_preauth() 400 if (ssh_packet_get_connection_out(ssh) != STDOUT_FILENO && in privsep_preauth() 401 dup2(ssh_packet_get_connection_out(ssh), in privsep_preauth() 423 privsep_postauth(struct ssh *ssh, Authctxt *authctxt) in privsep_postauth() argument 449 monitor_clear_keystate(ssh, pmonitor); in privsep_postauth() [all …]
|
| H A D | monitor.c | 120 int mm_answer_moduli(struct ssh *, int, struct sshbuf *); 121 int mm_answer_sign(struct ssh *, int, struct sshbuf *); 122 int mm_answer_pwnamallow(struct ssh *, int, struct sshbuf *); 123 int mm_answer_auth2_read_banner(struct ssh *, int, struct sshbuf *); 124 int mm_answer_authserv(struct ssh *, int, struct sshbuf *); 125 int mm_answer_authpassword(struct ssh *, int, struct sshbuf *); 126 int mm_answer_bsdauthquery(struct ssh *, int, struct sshbuf *); 127 int mm_answer_bsdauthrespond(struct ssh *, int, struct sshbuf *); 128 int mm_answer_keyallowed(struct ssh *, int, struct sshbuf *); 129 int mm_answer_keyverify(struct ssh *, int, struct sshbuf *); [all …]
|
| /freebsd/crypto/openssh/regress/unittests/sshkey/ |
| H A D | mktestdata.sh | 89 ssh-keygen -t rsa -b 1024 -C "RSA test key #1" -N "" -f rsa_1 -m PEM 90 ssh-keygen -t dsa -b 1024 -C "DSA test key #1" -N "" -f dsa_1 -m PEM 91 ssh-keygen -t ecdsa -b 256 -C "ECDSA test key #1" -N "" -f ecdsa_1 -m PEM 92 ssh-keygen -t ed25519 -C "ED25519 test key #1" -N "" -f ed25519_1 93 ssh-keygen -w "$SK_DUMMY" -t ecdsa-sk -C "ECDSA-SK test key #1" \ 95 ssh-keygen -w "$SK_DUMMY" -t ed25519-sk -C "ED25519-SK test key #1" \ 99 ssh-keygen -t rsa -b 2048 -C "RSA test key #2" -N "" -f rsa_2 -m PEM 100 ssh-keygen -t dsa -b 1024 -C "DSA test key #2" -N "" -f dsa_2 -m PEM 101 ssh-keygen -t ecdsa -b 521 -C "ECDSA test key #2" -N "" -f ecdsa_2 -m PEM 102 ssh-keygen -t ed25519 -C "ED25519 test key #2" -N "" -f ed25519_2 [all …]
|
| /freebsd/crypto/openssh/contrib/suse/ |
| H A D | openssh.spec | 20 Source1: x11-ssh-askpass-%{xversion}.tar.gz 25 Obsoletes: ssh 26 Provides: ssh 43 Obsoletes: ssh-extras 44 Provides: openssh:${_libdir}/ssh/ssh-askpass 79 - Add ssh-sk-helper and corresponding manual page. 88 - Updated for new gnome-ssh-askpass build 90 - Made symlink to gnome-ssh-askpass called ssh-askpass 139 --sysconfdir=%{_sysconfdir}/ssh \ 143 --libexecdir=%{_libdir}/ssh [all …]
|