Lines Matching refs:ssh

95 userauth_pubkey(struct ssh *ssh, const char *method)  in userauth_pubkey()  argument
97 Authctxt *authctxt = ssh->authctxt; in userauth_pubkey()
111 if ((r = sshpkt_get_u8(ssh, &have_sig)) != 0 || in userauth_pubkey()
112 (r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || in userauth_pubkey()
113 (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0) in userauth_pubkey()
118 if ((r = sshpkt_getb_froms(ssh, &b)) != 0 || in userauth_pubkey()
121 if (ssh->kex->initial_hostkey == NULL) in userauth_pubkey()
123 if (!sshkey_equal(hostkey, ssh->kex->initial_hostkey)) in userauth_pubkey()
192 if ((r = sshpkt_get_string(ssh, &sig, &slen)) != 0 || in userauth_pubkey()
193 (r = sshpkt_get_end(ssh)) != 0) in userauth_pubkey()
197 if (ssh->compat & SSH_OLD_SESSIONID) { in userauth_pubkey()
198 if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0) in userauth_pubkey()
202 ssh->kex->session_id)) != 0) in userauth_pubkey()
222 (r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0) in userauth_pubkey()
229 if (mm_user_key_allowed(ssh, pw, key, 1, &authopts) && in userauth_pubkey()
232 (ssh->compat & SSH_BUG_SIGTYPE) == 0 ? pkalg : NULL, in userauth_pubkey()
233 ssh->compat, &sig_details) == 0) { in userauth_pubkey()
251 authctxt->user, ssh_remote_ipaddr(ssh), in userauth_pubkey()
252 ssh_remote_port(ssh)); in userauth_pubkey()
265 authctxt->user, ssh_remote_ipaddr(ssh), in userauth_pubkey()
266 ssh_remote_port(ssh)); in userauth_pubkey()
276 if ((r = sshpkt_get_end(ssh)) != 0) in userauth_pubkey()
291 if (mm_user_key_allowed(ssh, pw, key, 0, NULL)) { in userauth_pubkey()
292 if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_PK_OK)) in userauth_pubkey()
294 (r = sshpkt_put_cstring(ssh, pkalg)) != 0 || in userauth_pubkey()
295 (r = sshpkt_put_string(ssh, pkblob, blen)) != 0 || in userauth_pubkey()
296 (r = sshpkt_send(ssh)) != 0 || in userauth_pubkey()
297 (r = ssh_packet_write_wait(ssh)) < 0) in userauth_pubkey()
303 if (authenticated == 1 && auth_activate_options(ssh, authopts) != 0) { in userauth_pubkey()
759 user_key_allowed(struct ssh *ssh, struct passwd *pw, struct sshkey *key, in user_key_allowed() argument
776 if ((rdomain = ssh_packet_rdomain_in(ssh)) == NULL) in user_key_allowed()
778 remote_ip = ssh_remote_ipaddr(ssh); in user_key_allowed()
779 remote_host = auth_get_canonical_hostname(ssh, options.use_dns); in user_key_allowed()
781 ssh_local_ipaddr(ssh), ssh_local_port(ssh), in user_key_allowed()
782 remote_ip, ssh_remote_port(ssh)); in user_key_allowed()