Revision: 10943 https://osdn.net/projects/ttssh2/scm/svn/commits/10943 Author: nmaya Date: 2023-09-21 06:21:39 +0900 (Thu, 21 Sep 2023) Log Message: ----------- SSH2 の Rekey 時に SSH_MSG_NEWKEYS が送信されない問題を修正 ticket: #36109 issue: https://github.com/TeraTermProject/osdn-download/issues/8 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/36109 Modified Paths: -------------- trunk/ttssh2/ttxssh/ssh.c -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/ssh.c =================================================================== --- trunk/ttssh2/ttxssh/ssh.c 2023-09-17 05:33:06 UTC (rev 10942) +++ trunk/ttssh2/ttxssh/ssh.c 2023-09-20 21:21:39 UTC (rev 10943) @@ -3056,13 +3056,13 @@ // \x94F\x8F_\x83C\x83A\x83\x8D\x83O\x82͎\xC0\x8E\xBF\x8Eg\x82\xA6\x82Ȃ\xA2\x82̂ŁA\x82\xB1\x82̃^\x83C\x83~\x83\x93\x83O\x82Ŗ\xE2\x91\xE8\x82Ȃ\xA2\x81B AUTH_advance_to_next_cred(pvar); } - else { // SSH2 - // SSH2_MSG_NEWKEYS \x82\xAA\x96\xA2\x91\x97\x90M\x82Ȃ\xE7\x82Α\x97\x82\xE9 - if ((pvar->kex_status & KEX_FLAG_NEWKEYS_SENT) == 0) { - ssh2_send_newkeys(pvar); - } + } + + if (SSHv2(pvar)) { + // SSH2_MSG_NEWKEYS \x82\xAA\x96\xA2\x91\x97\x90M\x82Ȃ\xE7\x82Α\x97\x82\xE9 + if ((pvar->kex_status & KEX_FLAG_NEWKEYS_SENT) == 0) { + ssh2_send_newkeys(pvar); } - } } @@ -5770,6 +5770,7 @@ if (ret == TRUE) { // \x83z\x83X\x83g\x8C\xAE\x82̊m\x94F\x82\xAA\x90\xAC\x8C\x{1C2D42}\xBD\x82̂ŁA\x8C㑱\x82̏\x88\x97\x9D\x82\xF0\x8Ds\x82\xA4 SSH_notify_host_OK(pvar); + // known_hosts\x83_\x83C\x83A\x83\x8D\x83O\x82̌Ăяo\x82\xB5\x82\xBD\x82̂ŁA\x88ȍ~\x81A\x89\xBD\x82\xE0\x82\xB5\x82Ȃ\xA2\x81B } error: