| 83 |
// |
// |
| 84 |
#define NonNull(msg) ((msg)?(msg):"(null)") |
#define NonNull(msg) ((msg)?(msg):"(null)") |
| 85 |
|
|
| 86 |
|
#if defined(__MINGW32__) |
| 87 |
|
#define __FUNCTION__ |
| 88 |
|
#endif |
| 89 |
|
|
| 90 |
typedef enum { |
typedef enum { |
| 91 |
GetPayloadError = 0, |
GetPayloadError = 0, |
| 92 |
GetPayloadOK = 1, |
GetPayloadOK = 1, |
| 185 |
// channel function |
// channel function |
| 186 |
// |
// |
| 187 |
static Channel_t *ssh2_channel_new(unsigned int window, unsigned int maxpack, |
static Channel_t *ssh2_channel_new(unsigned int window, unsigned int maxpack, |
| 188 |
enum confirm_type type, int local_num) |
enum channel_type type, int local_num) |
| 189 |
{ |
{ |
| 190 |
int i, found; |
int i, found; |
| 191 |
Channel_t *c; |
Channel_t *c; |
| 3812 |
auth_data_ptr = outmsg + 8 + protocol_len; |
auth_data_ptr = outmsg + 8 + protocol_len; |
| 3813 |
for (i = 0; i < auth_data_len; i++) { |
for (i = 0; i < auth_data_len; i++) { |
| 3814 |
_snprintf_s(auth_data_ptr + i * 2, |
_snprintf_s(auth_data_ptr + i * 2, |
| 3815 |
outmsg_len - (auth_data_ptr - outmsg) - i * 2, |
outmsg_len - ((UINT_PTR)auth_data_ptr - (UINT_PTR)outmsg) - i * 2, |
| 3816 |
_TRUNCATE, "%.2x", auth_data[i]); |
_TRUNCATE, "%.2x", auth_data[i]); |
| 3817 |
} |
} |
| 3818 |
set_uint32(outmsg + 8 + protocol_len + data_len, screen_num); |
set_uint32(outmsg + 8 + protocol_len + data_len, screen_num); |
| 5837 |
// known_hosts対応 (2006.3.20 yutaka) |
// known_hosts対応 (2006.3.20 yutaka) |
| 5838 |
if (hostkey->type != pvar->hostkey_type) { // ホストキーの種別比較 |
if (hostkey->type != pvar->hostkey_type) { // ホストキーの種別比較 |
| 5839 |
_snprintf_s(emsg_tmp, sizeof(emsg_tmp), _TRUNCATE, |
_snprintf_s(emsg_tmp, sizeof(emsg_tmp), _TRUNCATE, |
| 5840 |
"%s: type mismatch for decoded server_host_key_blob (kex:%s blob:%s)", __FUNCTION__, |
"%s: type mismatch for decoded server_host_key_blob (kex:%s blob:%s)", /*__FUNCTION__*/"handle_SSH2_dh_kex_reply", |
| 5841 |
get_ssh_keytype_name(pvar->hostkey_type), get_ssh_keytype_name(hostkey->type)); |
get_ssh_keytype_name(pvar->hostkey_type), get_ssh_keytype_name(hostkey->type)); |
| 5842 |
emsg = emsg_tmp; |
emsg = emsg_tmp; |
| 5843 |
goto error; |
goto error; |
| 5980 |
// known_hosts対応 (2006.3.20 yutaka) |
// known_hosts対応 (2006.3.20 yutaka) |
| 5981 |
if (hostkey->type != pvar->hostkey_type) { // ホストキーの種別比較 |
if (hostkey->type != pvar->hostkey_type) { // ホストキーの種別比較 |
| 5982 |
_snprintf_s(emsg_tmp, sizeof(emsg_tmp), _TRUNCATE, |
_snprintf_s(emsg_tmp, sizeof(emsg_tmp), _TRUNCATE, |
| 5983 |
"%s: type mismatch for decoded server_host_key_blob (kex:%s blob:%s)", __FUNCTION__, |
"%s: type mismatch for decoded server_host_key_blob (kex:%s blob:%s)", /*__FUNCTION__*/"handle_SSH2_dh_gex_reply", |
| 5984 |
get_ssh_keytype_name(pvar->hostkey_type), get_ssh_keytype_name(hostkey->type)); |
get_ssh_keytype_name(pvar->hostkey_type), get_ssh_keytype_name(hostkey->type)); |
| 5985 |
emsg = emsg_tmp; |
emsg = emsg_tmp; |
| 5986 |
goto error; |
goto error; |
| 6129 |
// known_hosts対応 (2006.3.20 yutaka) |
// known_hosts対応 (2006.3.20 yutaka) |
| 6130 |
if (hostkey->type != pvar->hostkey_type) { // ホストキーの種別比較 |
if (hostkey->type != pvar->hostkey_type) { // ホストキーの種別比較 |
| 6131 |
_snprintf_s(emsg_tmp, sizeof(emsg_tmp), _TRUNCATE, |
_snprintf_s(emsg_tmp, sizeof(emsg_tmp), _TRUNCATE, |
| 6132 |
"%s: type mismatch for decoded server_host_key_blob (kex:%s blob:%s)", __FUNCTION__, |
"%s: type mismatch for decoded server_host_key_blob (kex:%s blob:%s)", /*__FUNCTION__*/"handle_SSH2_ecdh_kex_reply", |
| 6133 |
get_ssh_keytype_name(pvar->hostkey_type), get_ssh_keytype_name(hostkey->type)); |
get_ssh_keytype_name(pvar->hostkey_type), get_ssh_keytype_name(hostkey->type)); |
| 6134 |
emsg = emsg_tmp; |
emsg = emsg_tmp; |
| 6135 |
goto error; |
goto error; |