| /freebsd/crypto/openssh/ |
| H A D | packet.h | 55 struct ssh { struct 94 typedef int (ssh_packet_hook_fn)(struct ssh *, struct sshbuf *, argument 97 struct ssh *ssh_alloc_session_state(void); 98 struct ssh *ssh_packet_set_connection(struct ssh *, int, int); 99 void ssh_packet_set_timeout(struct ssh *, int, int); 100 int ssh_packet_stop_discard(struct ssh *); 101 int ssh_packet_connection_af(struct ssh *); 102 void ssh_packet_set_nonblocking(struct ssh *); 103 int ssh_packet_get_connection_in(struct ssh *); 104 int ssh_packet_get_connection_out(struct ssh *); [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 | 89 struct ssh; 93 typedef void channel_open_fn(struct ssh *, int, int, void *); 94 typedef void channel_callback_fn(struct ssh *, int, int, void *); 95 typedef int channel_infilter_fn(struct ssh *, struct Channel *, char *, int); 96 typedef void channel_filter_cleanup_fn(struct ssh *, int, void *); 97 typedef u_char *channel_outfilter_fn(struct ssh *, struct Channel *, 101 typedef void channel_confirm_cb(struct ssh *, int, struct Channel *, void *); 102 typedef void channel_confirm_abandon_cb(struct ssh *, struct Channel *, void *); 119 typedef int mux_callback_fn(struct ssh *, struct Channel *); 288 void channel_init_channels(struct ssh *ssh); [all …]
|
| H A D | serverloop.c | 92 static void server_init_dispatch(struct ssh *); 112 client_alive_check(struct ssh *ssh) in client_alive_check() argument 119 ssh_packet_inc_alive_timeouts(ssh) > in client_alive_check() 121 sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); in client_alive_check() 130 if ((channel_id = channel_find_open(ssh)) == -1) { in client_alive_check() 131 if ((r = sshpkt_start(ssh, SSH2_MSG_GLOBAL_REQUEST)) != 0 || in client_alive_check() 132 (r = sshpkt_put_cstring(ssh, "keepalive@openssh.com")) in client_alive_check() 134 (r = sshpkt_put_u8(ssh, 1)) != 0) /* boolean: want reply */ in client_alive_check() 137 channel_request_start(ssh, channel_id, in client_alive_check() 140 if ((r = sshpkt_send(ssh)) != 0) in client_alive_check() [all …]
|
| H A D | packet.c | 232 struct ssh * 235 struct ssh *ssh = NULL; in ssh_alloc_session_state() local 238 if ((ssh = calloc(1, sizeof(*ssh))) == NULL || in ssh_alloc_session_state() 240 (ssh->kex = kex_new()) == NULL || in ssh_alloc_session_state() 247 TAILQ_INIT(&ssh->private_keys); in ssh_alloc_session_state() 248 TAILQ_INIT(&ssh->public_keys); in ssh_alloc_session_state() 262 ssh->state = state; in ssh_alloc_session_state() 263 return ssh; in ssh_alloc_session_state() 265 if (ssh) { in ssh_alloc_session_state() 266 kex_free(ssh->kex); in ssh_alloc_session_state() [all …]
|
| H A D | auth2-gss.c | 56 static int input_gssapi_token(int type, uint32_t plen, struct ssh *ssh); 57 static int input_gssapi_mic(int type, uint32_t plen, struct ssh *ssh); 58 static int input_gssapi_exchange_complete(int type, uint32_t plen, struct ssh *ssh); 59 static int input_gssapi_errtok(int, uint32_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, uint32_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, uint32_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 | 42 int ssh_init(struct ssh **, int is_server, struct kex_params *kex_params); 47 void ssh_free(struct ssh *); 52 void ssh_set_app_data(struct ssh *, void *); 53 void *ssh_get_app_data(struct ssh *); 63 int ssh_add_hostkey(struct ssh *ssh, struct sshkey *key); 71 int ssh_set_verify_host_key_callback(struct ssh *ssh, 72 int (*cb)(struct sshkey *, struct 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, [all …]
|
| H A D | nchan.c | 75 static void chan_send_eof2(struct ssh *, Channel *); 76 static void chan_send_eow2(struct ssh *, Channel *); 79 static void chan_shutdown_write(struct ssh *, Channel *); 80 static void chan_shutdown_read(struct ssh *, Channel *); 81 static void chan_shutdown_extended_read(struct ssh *, Channel *); 111 chan_read_failed(struct ssh *ssh, Channel *c) in chan_read_failed() argument 116 chan_shutdown_read(ssh, c); in chan_read_failed() 127 chan_ibuf_empty(struct ssh *ssh, Channel *c) in chan_ibuf_empty() argument 138 chan_send_eof2(ssh, c); in chan_ibuf_empty() 149 chan_obuf_empty(struct ssh *ssh, Channel *c) in chan_obuf_empty() argument [all …]
|
| H A D | channels.c | 94 typedef void chan_fn(struct ssh *, Channel *c); 213 static void port_open_helper(struct ssh *ssh, Channel *c, char *rtype); 219 static Channel *rdynamic_connect_prepare(struct ssh *, char *, char *); 220 static int rdynamic_connect_finish(struct ssh *, Channel *); 228 channel_init_channels(struct ssh *ssh) in channel_init_channels() argument 241 ssh->chanctxt = sc; in channel_init_channels() 245 channel_by_id(struct ssh *ssh, int id) in channel_by_id() argument 249 if (id < 0 || (u_int)id >= ssh->chanctxt->channels_alloc) { in channel_by_id() 253 c = ssh->chanctxt->channels[id]; in channel_by_id() 262 channel_by_remote_id(struct ssh *ssh, u_int remote_id) in channel_by_remote_id() argument [all …]
|
| H A D | kex.c | 64 static int kex_choose_conf(struct ssh *, uint32_t seq); 65 static int kex_input_newkeys(int, uint32_t, struct ssh *); 87 kex_proposal_populate_entries(struct ssh *ssh, char *prop[PROPOSAL_MAX], in kex_proposal_populate_entries() argument 93 const char **defprop = ssh->kex->server ? defpropserver : defpropclient; in kex_proposal_populate_entries() 103 if ((cp = kex_names_cat(kexalgos, ssh->kex->server ? in kex_proposal_populate_entries() 111 prop[i] = compat_kex_proposal(ssh, cp); in kex_proposal_populate_entries() 232 kex_protocol_error(int type, uint32_t seq, struct ssh *ssh) in kex_protocol_error() argument 237 if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) { in kex_protocol_error() 238 ssh_packet_disconnect(ssh, "strict KEX violation: " in kex_protocol_error() 242 if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || in kex_protocol_error() [all …]
|
| H A D | sshconnect2.c | 91 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh) in verify_host_key_callback() argument 219 ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port, in ssh_kex2() argument 231 ssh_packet_set_rekey_limits(ssh, options.rekey_limit, in ssh_kex2() 254 kex_proposal_populate_entries(ssh, myproposal, in ssh_kex2() 262 if ((r = kex_setup(ssh, myproposal)) != 0) in ssh_kex2() 265 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; in ssh_kex2() 266 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; in ssh_kex2() 267 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; in ssh_kex2() 268 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; in ssh_kex2() 269 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client; in ssh_kex2() [all …]
|
| H A D | clientloop.c | 155 static void client_init_dispatch(struct ssh *ssh); 241 set_control_persist_exit_time(struct ssh *ssh) in set_control_persist_exit_time() argument 247 } else if (channel_still_open(ssh)) { in set_control_persist_exit_time() 285 client_x11_get_proto(struct ssh *ssh, const char *display, in client_x11_get_proto() argument 380 channel_set_x11_refuse_time(ssh, in client_x11_get_proto() 456 client_check_window_change(struct ssh *ssh) in client_check_window_change() argument 462 channel_send_window_changes(ssh); in client_check_window_change() 466 client_global_request_reply(int type, uint32_t seq, struct ssh *ssh) in client_global_request_reply() argument 473 gc->cb(ssh, type, seq, gc->ctx); in client_global_request_reply() 479 ssh_packet_set_alive_timeouts(ssh, 0); in client_global_request_reply() [all …]
|
| H A D | kexgexs.c | 57 static int input_kex_dh_gex_request(int, uint32_t, struct ssh *); 58 static int input_kex_dh_gex_init(int, uint32_t, struct ssh *); 61 kexgex_server(struct ssh *ssh) in kexgex_server() argument 63 ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST, in kexgex_server() 70 input_kex_dh_gex_request(int type, uint32_t seq, struct ssh *ssh) in input_kex_dh_gex_request() argument 72 struct kex *kex = ssh->kex; in input_kex_dh_gex_request() 78 ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST, &kex_protocol_error); in input_kex_dh_gex_request() 80 if ((r = sshpkt_get_u32(ssh, &min)) != 0 || in input_kex_dh_gex_request() 81 (r = sshpkt_get_u32(ssh, &nbits)) != 0 || in input_kex_dh_gex_request() 82 (r = sshpkt_get_u32(ssh, &max)) != 0 || in input_kex_dh_gex_request() [all …]
|
| H A D | kexgexc.c | 55 static int input_kex_dh_gex_group(int, uint32_t, struct ssh *); 56 static int input_kex_dh_gex_reply(int, uint32_t, struct ssh *); 59 kexgex_client(struct ssh *ssh) in kexgex_client() argument 61 struct kex *kex = ssh->kex; in kexgex_client() 70 if (ssh->compat & SSH_BUG_DHGEX_LARGE) in kexgex_client() 73 if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST)) != 0 || in kexgex_client() 74 (r = sshpkt_put_u32(ssh, kex->min)) != 0 || in kexgex_client() 75 (r = sshpkt_put_u32(ssh, kex->nbits)) != 0 || in kexgex_client() 76 (r = sshpkt_put_u32(ssh, kex->max)) != 0 || in kexgex_client() 77 (r = sshpkt_send(ssh)) != 0) in kexgex_client() [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, uint32_t, struct ssh *); 197 auth2_challenge(struct ssh *ssh, char *devs) in auth2_challenge() argument 199 Authctxt *authctxt = ssh->authctxt; in auth2_challenge() 208 return auth2_challenge_start(ssh); in auth2_challenge() 213 auth2_challenge_stop(struct ssh *ssh) in auth2_challenge_stop() argument 215 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_stop() 217 ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); in auth2_challenge_stop() 226 auth2_challenge_start(struct ssh *ssh) in auth2_challenge_start() argument [all …]
|
| H A D | session.c | 122 void session_set_fds(struct ssh *, Session *, int, int, int, int, int); 125 int session_setup_x11fwd(struct ssh *, Session *); 126 int do_exec_pty(struct ssh *, Session *, const char *); 127 int do_exec_no_pty(struct ssh *, Session *, const char *); 128 int do_exec(struct ssh *, Session *, const char *); 129 void do_login(struct ssh *, Session *, const char *); 130 void do_child(struct ssh *, Session *, const char *); 134 static void do_authenticated2(struct ssh *, Authctxt *); 136 static int session_pty_req(struct ssh *, Session *); 186 auth_input_request_forwarding(struct ssh *ssh, struct passwd *pw, int agent_new) in auth_input_request_forwarding() argument [all …]
|
| H A D | auth2.c | 91 static int input_service_request(int, uint32_t, struct ssh *); 92 static int input_userauth_request(int, uint32_t, struct ssh *); 139 userauth_send_banner(struct ssh *ssh, const char *msg) in userauth_send_banner() argument 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 *ssh) in userauth_banner() argument 161 userauth_send_banner(ssh, banner); in userauth_banner() 171 do_authentication2(struct ssh *ssh) in do_authentication2() 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 | monitor_wrap.h | 37 struct ssh; 49 void mm_sshkey_setcompat(struct ssh *); 50 int mm_sshkey_sign(struct ssh *, struct sshkey *, u_char **, size_t *, 54 struct passwd *mm_getpwnamallow(struct ssh *, const char *); 56 int mm_auth_password(struct ssh *, char *); 59 int mm_user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, int, 61 int mm_hostbased_key_allowed(struct ssh *, struct passwd *, const char *, 66 void mm_decode_activate_server_options(struct ssh *ssh, struct sshbuf *m); 77 void mm_start_pam(struct ssh *ssh); 87 void mm_audit_event(struct ssh *, ssh_audit_event_t); [all …]
|
| H A D | kexgen.c | 44 static int input_kex_gen_init(int, uint32_t, struct ssh *); 45 static int input_kex_gen_reply(int type, uint32_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, uint32_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-auth.c | 148 struct ssh *the_active_state; 163 static void do_ssh2_kex(struct ssh *); 286 get_hostkey_public_by_type(int type, int nid, struct ssh *ssh) in get_hostkey_public_by_type() argument 323 get_hostkey_private_by_type(int type, int nid, struct ssh *ssh) in get_hostkey_private_by_type() argument 336 get_hostkey_public_by_index(int ind, struct ssh *ssh) in get_hostkey_public_by_index() argument 344 get_hostkey_index(struct sshkey *key, int compare, struct ssh *ssh) in get_hostkey_index() argument 416 recv_privsep_state(struct ssh *ssh, struct sshbuf *conf, in recv_privsep_state() argument 423 mm_get_state(ssh, &includes, conf, NULL, timing_secretp, in recv_privsep_state() 438 struct ssh *ssh = NULL; in main() local 559 connection_info = server_get_connection_info(ssh, 0, 0); in main() [all …]
|
| /freebsd/crypto/openssh/regress/unittests/sshkey/ |
| H A D | mktestdata.sh | 68 ssh-keygen -t rsa -b 1024 -C "RSA test key #1" -N "" -f rsa_1 -m PEM 69 ssh-keygen -t ecdsa -b 256 -C "ECDSA test key #1" -N "" -f ecdsa_1 -m PEM 70 ssh-keygen -t ed25519 -C "ED25519 test key #1" -N "" -f ed25519_1 71 ssh-keygen -w "$SK_DUMMY" -t ecdsa-sk -C "ECDSA-SK test key #1" \ 73 ssh-keygen -w "$SK_DUMMY" -t ed25519-sk -C "ED25519-SK test key #1" \ 77 ssh-keygen -t rsa -b 2048 -C "RSA test key #2" -N "" -f rsa_2 -m PEM 78 ssh-keygen -t ecdsa -b 521 -C "ECDSA test key #2" -N "" -f ecdsa_2 -m PEM 79 ssh-keygen -t ed25519 -C "ED25519 test key #2" -N "" -f ed25519_2 80 ssh-keygen -w "$SK_DUMMY" -t ecdsa-sk -C "ECDSA-SK test key #2" \ 82 ssh-keygen -w "$SK_DUMMY" -t ed25519-sk -C "ED25519-SK test key #2" \ [all …]
|
| /freebsd/crypto/openssh/contrib/ |
| H A D | Makefile | 6 gnome-ssh-askpass1: gnome-ssh-askpass1.c 8 gnome-ssh-askpass1.c -o gnome-ssh-askpass1 \ 11 gnome-ssh-askpass2: gnome-ssh-askpass2.c 13 gnome-ssh-askpass2.c -o gnome-ssh-askpass2 \ 16 gnome-ssh-askpass3: gnome-ssh-askpass3.c 18 gnome-ssh-askpass3.c -o gnome-ssh-askpass3 \ 21 gnome-ssh-askpass4: gnome-ssh-askpass4.c 23 gnome-ssh-askpass4.c -o gnome-ssh-askpass4 \ 27 rm -f *.o gnome-ssh-askpass gnome-ssh-askpass[123]
|
| /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 …]
|