version 1.105, 2021/01/26 00:49:30 |
version 1.106, 2021/01/27 10:05:28 |
|
|
#include "ssh.h" |
#include "ssh.h" |
#include "ssh2.h" |
#include "ssh2.h" |
#include "packet.h" |
#include "packet.h" |
|
#include "kex.h" |
#include "sshbuf.h" |
#include "sshbuf.h" |
#include "log.h" |
#include "log.h" |
#include "misc.h" |
#include "misc.h" |
|
|
|
|
/* import */ |
/* import */ |
extern ServerOptions options; |
extern ServerOptions options; |
extern u_char *session_id2; |
|
extern u_int session_id2_len; |
|
|
|
static char * |
static char * |
format_key(const struct sshkey *key) |
format_key(const struct sshkey *key) |
|
|
if ((b = sshbuf_new()) == NULL) |
if ((b = sshbuf_new()) == NULL) |
fatal_f("sshbuf_new failed"); |
fatal_f("sshbuf_new failed"); |
if (ssh->compat & SSH_OLD_SESSIONID) { |
if (ssh->compat & SSH_OLD_SESSIONID) { |
if ((r = sshbuf_put(b, session_id2, session_id2_len)) != 0) |
if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0) |
fatal_fr(r, "put old session id"); |
fatal_fr(r, "put old session id"); |
} else { |
} else { |
if ((r = sshbuf_put_string(b, session_id2, |
if ((r = sshbuf_put_stringb(b, |
session_id2_len)) != 0) |
ssh->kex->session_id)) != 0) |
fatal_fr(r, "put session id"); |
fatal_fr(r, "put session id"); |
} |
} |
if (!authctxt->valid || authctxt->user == NULL) { |
if (!authctxt->valid || authctxt->user == NULL) { |