version 1.32, 2017/12/18 02:25:15 |
version 1.33, 2018/01/23 05:27:21 |
|
|
Authctxt *authctxt = ssh->authctxt; |
Authctxt *authctxt = ssh->authctxt; |
struct sshbuf *b; |
struct sshbuf *b; |
struct sshkey *key = NULL; |
struct sshkey *key = NULL; |
char *pkalg, *cuser, *chost, *service; |
char *pkalg, *cuser, *chost; |
u_char *pkblob, *sig; |
u_char *pkblob, *sig; |
size_t alen, blen, slen; |
size_t alen, blen, slen; |
int r, pktype, authenticated = 0; |
int r, pktype, authenticated = 0; |
|
|
goto done; |
goto done; |
} |
} |
|
|
service = ssh->compat & SSH_BUG_HBSERVICE ? "ssh-userauth" : |
|
authctxt->service; |
|
if ((b = sshbuf_new()) == NULL) |
if ((b = sshbuf_new()) == NULL) |
fatal("%s: sshbuf_new failed", __func__); |
fatal("%s: sshbuf_new failed", __func__); |
/* reconstruct packet */ |
/* reconstruct packet */ |
if ((r = sshbuf_put_string(b, session_id2, session_id2_len)) != 0 || |
if ((r = sshbuf_put_string(b, session_id2, session_id2_len)) != 0 || |
(r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 || |
(r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 || |
(r = sshbuf_put_cstring(b, authctxt->user)) != 0 || |
(r = sshbuf_put_cstring(b, authctxt->user)) != 0 || |
(r = sshbuf_put_cstring(b, service)) != 0 || |
(r = sshbuf_put_cstring(b, authctxt->service)) != 0 || |
(r = sshbuf_put_cstring(b, "hostbased")) != 0 || |
(r = sshbuf_put_cstring(b, "hostbased")) != 0 || |
(r = sshbuf_put_string(b, pkalg, alen)) != 0 || |
(r = sshbuf_put_string(b, pkalg, alen)) != 0 || |
(r = sshbuf_put_string(b, pkblob, blen)) != 0 || |
(r = sshbuf_put_string(b, pkblob, blen)) != 0 || |