svnno****@sourc*****
svnno****@sourc*****
2015年 4月 30日 (木) 01:23:20 JST
Revision: 5839 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5839 Author: yutakapon Date: 2015-04-30 01:23:18 +0900 (Thu, 30 Apr 2015) Log Message: ----------- チケット #35047 SSH サーバホスト公開鍵の自動更新 known_hosts ファイルの更新の実施有無を設定できるようにした。 TERATERM.INI の [TTSSH] セクションに"UpdateHostkeys"エントリを追加した。 デフォルトは、OpenSSH 6.8(oUpdateHostkeys)に合わせて「オフ」とする。 Ticket Links: ------------ http://sourceforge.jp/projects/ttssh2/tracker/detail/35047 Modified Paths: -------------- trunk/installer/release/TERATERM.INI trunk/ttssh2/ttxssh/key.c trunk/ttssh2/ttxssh/ttxssh.c trunk/ttssh2/ttxssh/ttxssh.h -------------- next part -------------- Modified: trunk/installer/release/TERATERM.INI =================================================================== --- trunk/installer/release/TERATERM.INI 2015-04-26 14:46:48 UTC (rev 5838) +++ trunk/installer/release/TERATERM.INI 2015-04-29 16:23:18 UTC (rev 5839) @@ -830,6 +830,12 @@ ; X11 Forwarding X11Display= +; Host key rotation support (derived from OpenSSH 6.8) +; 0 ... Disabled +; 1 ... Enabled +UpdateHostkeys=0 + + [TTProxy] ConnectionTimeout="10" SocksResolve="auto" Modified: trunk/ttssh2/ttxssh/key.c =================================================================== --- trunk/ttssh2/ttxssh/key.c 2015-04-26 14:46:48 UTC (rev 5838) +++ trunk/ttssh2/ttxssh/key.c 2015-04-29 16:23:18 UTC (rev 5839) @@ -1867,7 +1867,12 @@ struct hostkeys_update_ctx *ctx = NULL; Key *key = NULL; - // TODO: Tera Term\x82̐ݒ\xE8\x82ŁA\x93\x96\x8AY\x8B@\x94\\x82̃I\x83\x93\x83I\x83t\x82𐧌\xE4\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9\x81B + // Tera Term\x82̐ݒ\xE8\x82ŁA\x93\x96\x8AY\x8B@\x94\\x82̃I\x83\x93\x83I\x83t\x82𐧌\xE4\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9\x81B + if (pvar->settings.UpdateHostkeys == 0) { + _snprintf_s(msg, sizeof(msg), _TRUNCATE, "Hostkey was not updated because ts.UpdateHostkeys is disabled."); + notify_verbose_message(pvar, msg, LOG_LEVEL_VERBOSE); + goto error; + } ctx = calloc(1, sizeof(struct hostkeys_update_ctx)); if (ctx == NULL) Modified: trunk/ttssh2/ttxssh/ttxssh.c =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.c 2015-04-26 14:46:48 UTC (rev 5838) +++ trunk/ttssh2/ttxssh/ttxssh.c 2015-04-29 16:23:18 UTC (rev 5839) @@ -475,6 +475,8 @@ READ_STD_STRING_OPTION(X11Display); + settings->UpdateHostkeys = read_BOOL_option(fileName, "UpdateHostkeys", FALSE); + clear_local_settings(pvar); } @@ -580,6 +582,9 @@ WritePrivateProfileString("TTSSH", "DisablePopupMessage", buf, fileName); WritePrivateProfileString("TTSSH", "X11Display", settings->X11Display, fileName); + + WritePrivateProfileString("TTSSH", "UpdateHostkeys", + settings->UpdateHostkeys ? "1" : "0", fileName); } Modified: trunk/ttssh2/ttxssh/ttxssh.h =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.h 2015-04-26 14:46:48 UTC (rev 5838) +++ trunk/ttssh2/ttxssh/ttxssh.h 2015-04-29 16:23:18 UTC (rev 5839) @@ -159,6 +159,8 @@ int DisablePopupMessage; char X11Display[128]; + + BOOL UpdateHostkeys; } TS_SSH; typedef struct _TInstVar {