/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 | 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 | packet.c | 230 struct ssh * 233 struct ssh *ssh = NULL; in ssh_alloc_session_state() local 236 if ((ssh = calloc(1, sizeof(*ssh))) == NULL || in ssh_alloc_session_state() 238 (ssh->kex = kex_new()) == NULL || in ssh_alloc_session_state() 245 TAILQ_INIT(&ssh->private_keys); in ssh_alloc_session_state() 246 TAILQ_INIT(&ssh->public_keys); in ssh_alloc_session_state() 258 ssh->state = state; in ssh_alloc_session_state() 259 return ssh; in ssh_alloc_session_state() 261 if (ssh) { in ssh_alloc_session_state() 262 kex_free(ssh->kex); in ssh_alloc_session_state() [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 | channels.c | 101 typedef void chan_fn(struct ssh *, Channel *c); 216 static void port_open_helper(struct ssh *ssh, Channel *c, char *rtype); 222 static Channel *rdynamic_connect_prepare(struct ssh *, char *, char *); 223 static int rdynamic_connect_finish(struct ssh *, Channel *); 231 channel_init_channels(struct ssh *ssh) in channel_init_channels() argument 242 ssh->chanctxt = sc; in channel_init_channels() 246 channel_by_id(struct ssh *ssh, int id) in channel_by_id() argument 250 if (id < 0 || (u_int)id >= ssh->chanctxt->channels_alloc) { in channel_by_id() 254 c = ssh->chanctxt->channels[id]; in channel_by_id() 263 channel_by_remote_id(struct ssh *ssh, u_int remote_id) in channel_by_remote_id() argument [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 | 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 | 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 | 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 | 92 static int input_service_request(int, u_int32_t, struct ssh *); 93 static int input_userauth_request(int, u_int32_t, struct ssh *); 140 userauth_send_banner(struct ssh *ssh, const char *msg) in userauth_send_banner() argument 144 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_BANNER)) != 0 || in userauth_send_banner() 145 (r = sshpkt_put_cstring(ssh, msg)) != 0 || in userauth_send_banner() 146 (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language, unused */ in userauth_send_banner() 147 (r = sshpkt_send(ssh)) != 0) in userauth_send_banner() 153 userauth_banner(struct ssh *ssh) in userauth_banner() argument 162 userauth_send_banner(ssh, banner); in userauth_banner() 172 do_authentication2(struct ssh *ssh) in do_authentication2() 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 | sshd-session.c | 180 struct ssh *the_active_state; 197 static void do_ssh2_kex(struct ssh *); 325 privsep_preauth(struct ssh *ssh) in privsep_preauth() argument 334 pmonitor->m_pkex = &ssh->kex; in privsep_preauth() 353 monitor_child_preauth(ssh, pmonitor); in privsep_preauth() 392 privsep_postauth(struct ssh *ssh, Authctxt *authctxt) in privsep_postauth() argument 418 monitor_clear_keystate(ssh, pmonitor); in privsep_postauth() 419 monitor_child_postauth(ssh, pmonitor); in privsep_postauth() 440 monitor_apply_keystate(ssh, pmonitor); in privsep_postauth() 446 ssh_packet_set_authenticated(ssh); in privsep_postauth() [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 | 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 *); 55 int client_simple_escape_filter(struct ssh *, Channel *, char *, int); 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 *); [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 …]
|