version 1.289, 2020/01/23 10:53:04 |
version 1.290, 2020/01/30 07:20:05 |
|
|
sshpkt_vfatal(struct ssh *ssh, int r, const char *fmt, va_list ap) |
sshpkt_vfatal(struct ssh *ssh, int r, const char *fmt, va_list ap) |
{ |
{ |
char *tag = NULL, remote_id[512]; |
char *tag = NULL, remote_id[512]; |
|
int oerrno = errno; |
|
|
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); |
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); |
|
|
|
|
case SSH_ERR_NO_HOSTKEY_ALG_MATCH: |
case SSH_ERR_NO_HOSTKEY_ALG_MATCH: |
if (ssh && ssh->kex && ssh->kex->failed_choice) { |
if (ssh && ssh->kex && ssh->kex->failed_choice) { |
ssh_packet_clear_keys(ssh); |
ssh_packet_clear_keys(ssh); |
|
errno = oerrno; |
logdie("Unable to negotiate with %s: %s. " |
logdie("Unable to negotiate with %s: %s. " |
"Their offer: %s", remote_id, ssh_err(r), |
"Their offer: %s", remote_id, ssh_err(r), |
ssh->kex->failed_choice); |
ssh->kex->failed_choice); |
|
|
__func__); |
__func__); |
} |
} |
ssh_packet_clear_keys(ssh); |
ssh_packet_clear_keys(ssh); |
|
errno = oerrno; |
logdie("%s%sConnection %s %s: %s", |
logdie("%s%sConnection %s %s: %s", |
tag != NULL ? tag : "", tag != NULL ? ": " : "", |
tag != NULL ? tag : "", tag != NULL ? ": " : "", |
ssh->state->server_side ? "from" : "to", |
ssh->state->server_side ? "from" : "to", |