svnno****@sourc*****
svnno****@sourc*****
2011年 2月 24日 (木) 00:47:30 JST
Revision: 4332 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4332 Author: maya Date: 2011-02-24 00:47:30 +0900 (Thu, 24 Feb 2011) Log Message: ----------- æ¥ç¶ãããã¨ãã SSH ãµã¼ãã®ãã¹ãéµã¨éãå½¢å¼ã®éµã ssh_known_hosts ã«ããå ´åãéµãç½®ãæãããã¤ã¢ãã°ã§ã¯ãªã追å ãããã¤ã¢ãã°ã表示ãã¦ã¦ã¼ã¶ã«åãåãããããã«ãã Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html trunk/installer/release/lang/English.lng trunk/installer/release/lang/French.lng trunk/installer/release/lang/German.lng trunk/installer/release/lang/Japanese.lng trunk/ttssh2/ttxssh/hosts.c trunk/ttssh2/ttxssh/resource.h trunk/ttssh2/ttxssh/ttxssh.rc -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/doc/en/html/about/history.html 2011-02-23 15:47:30 UTC (rev 4332) @@ -1638,6 +1638,7 @@ <!--li>SSH2 Ì diffie-hellman-group-exchange-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521 ®ð·vgRðT|[gµ½B</li--> <!--li>SSH2 Ì ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 zXg®û®ðT|[gµ½B</li--> <!--li>SSH2 Ì ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 öJ®FØðT|[gµ½B</li--> + <!--li>ssh_known_hosts Éá¤`®ÌT[ozXg®ª éêA®ðu«·¦é©Ç¤©ÅÍÈÇÁ·é©Ç¤©[UÉâ¢í¹éæ¤Éµ½B</li--> </ul> </li> Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/doc/ja/html/about/history.html 2011-02-23 15:47:30 UTC (rev 4332) @@ -1639,6 +1639,7 @@ <li>SSH2 Ì diffie-hellman-group-exchange-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521 ®ð·vgRðT|[gµ½B</li> <li>SSH2 Ì ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 zXg®û®ðT|[gµ½B</li> <li>SSH2 Ì ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 öJ®FØðT|[gµ½B</li> + <li>ssh_known_hosts Éá¤`®ÌT[ozXg®ª éêA®ðu«·¦é©Ç¤©ÅÍÈÇÁ·é©Ç¤©[UÉâ¢í¹éæ¤Éµ½B</li> </ul> </li> Modified: trunk/installer/release/lang/English.lng =================================================================== --- trunk/installer/release/lang/English.lng 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/installer/release/lang/English.lng 2011-02-23 15:47:30 UTC (rev 4332) @@ -517,13 +517,20 @@ MSG_RHOSTS_NOTDEFAULT_ERROR=Rhosts authentication will probably fail because it was not the default authentication method.\nTo use Rhosts authentication in TTSSH, you need to set it to be the default by restarting\nTTSSH and selecting "SSH Authentication..." from the Setup menubefore connecting. MSG_NOAUTHMETHOD_ERROR=Server does not support any of the authentication options\nprovided by TTSSH. This connection will now close. -; dlg diff host +; dlg diff key DLG_DIFFERENTKEY_TITLE=SECURITY WARNING DLG_DIFFERENTKEY_WARNING=Your known hosts list has an entry for the server "####################################", but the machine you have contacted has presented a DIFFERENT KEY to the one in your known hosts list. A hostile machine may be pretending to be the server. DLG_DIFFERENTKEY_WARNING2=If you choose to add this new key to the known hosts list and continue, then you will not receive this warning again. DLG_DIFFERENTKEY_FINGERPRINT=The server's host key fingerprint is: DLG_DIFFERENTKEY_REPLACE=&Replace the exist key with this new key +; dlg diff type key +DLG_DIFFERENTTYPEKEY_TITLE=SECURITY WARNING +DLG_DIFFERENTTYPEKEY_WARNINIG=Your known hosts list has an entry for the server "####################################", but the machine you have contacted has presented a DIFFERENT TYPE KEY to the one in your known hosts list. A hostile machine may be pretending to be the server. +DLG_DIFFERENTTYPEKEY_WARNINIG2=If you choose to add this new key to the known hosts list and continue, then you will not receive this warning again. +DLG_DIFFERENTTYPEKEY_FINGERPRINT=The server's host key fingerprint is: +DLG_DIFFERENTTYPEKEY_ADD=&Add this machine and its key to the known hosts list + ; dlg fwd edit DLG_FWD_TITLE=SSH Port Forwarding DLG_FWD_BANNER=Select direction for forwarded port: Modified: trunk/installer/release/lang/French.lng =================================================================== --- trunk/installer/release/lang/French.lng 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/installer/release/lang/French.lng 2011-02-23 15:47:30 UTC (rev 4332) @@ -516,13 +516,20 @@ MSG_RHOSTS_NOTDEFAULT_ERROR=L'authentification Rhosts va probablement échouer car ce n'est pas la méthode d'authentification par défaut.\nPour utiliser l'authentification Rhosts avec TTSSH, il faut la paramétrer par défaut en redémarrant\nTTSSH et en sélectionnant "Authentification SSH..." dans le menu de configuration avant de vous connecter. MSG_NOAUTHMETHOD_ERROR=Le serveur ne supporte aucune des options d'authentification\nfournies par TTSSH. Cette connexion va maintenant être fermée. -; dlg diff host +; dlg diff key DLG_DIFFERENTKEY_TITLE=ALERTE DE SECURITE DLG_DIFFERENTKEY_WARNING=Votre liste d'hôte connus a une entrée pour le serveur "####################################", mais la machine contactée a présenté une CLE DIFFERENTE ! Une machine hostile pourrait se faire passer pour le serveur. DLG_DIFFERENTKEY_WARNING2=Si vous choisissez d'ajouter la nouvelle clé à votre liste et de continuer, vous ne recevrez plus cet avertissement. DLG_DIFFERENTKEY_FINGERPRINT=L'empreinte de la clé du serveur est: DLG_DIFFERENTKEY_REPLACE=&Remplacer la clé actuelle avec cette nouvelle clé +; dlg diff type key +DLG_DIFFERENTTYPEKEY_TITLE=ALERTE DE SECURITE +DLG_DIFFERENTTYPEKEY_WARNINIG=Your known hosts list has an entry for the server "####################################", but the machine you have contacted has presented a DIFFERENT TYPE KEY to the one in your known hosts list. A hostile machine may be pretending to be the server. +DLG_DIFFERENTTYPEKEY_WARNINIG2=Si vous choisissez d'ajouter la nouvelle clé à votre liste et de continuer, vous ne recevrez plus cet avertissement. +DLG_DIFFERENTTYPEKEY_FINGERPRINT=L'empreinte de la clé du serveur est: +DLG_DIFFERENTTYPEKEY_ADD=&Ajouter cette machine et sa clé à la liste des hôtes connus + ; dlg fwd edit DLG_FWD_TITLE=SSH Mappage de port DLG_FWD_BANNER=Sélectionner une direction pour le port mappé: Modified: trunk/installer/release/lang/German.lng =================================================================== --- trunk/installer/release/lang/German.lng 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/installer/release/lang/German.lng 2011-02-23 15:47:30 UTC (rev 4332) @@ -515,13 +515,20 @@ MSG_RHOSTS_NOTDEFAULT_ERROR=Rhosts authentication will probably fail because it was not the default authentication method.\nTo use Rhosts authentication in TTSSH, you need to set it to be the default by restarting\nTTSSH and selecting "SSH Authentication..." from the Setup menubefore connecting. MSG_NOAUTHMETHOD_ERROR=Der Server unterstützt keine der von TTSSH angebotenen\nAuthentifizierungs-Optionen. Die Verbindung wird beendet. -; dlg diff host +; dlg diff key DLG_DIFFERENTKEY_TITLE=SICHERHEITSWARNUNG DLG_DIFFERENTKEY_WARNING=Der Server ("####################################") ist in der "known hosts"-Liste bereits mit einem anderen Schlüssel eingetragen. DLG_DIFFERENTKEY_WARNING2=Wenn Sie auf 'Continue' klicken, wird der Server in die Liste aufgenommen und die Fehlermeldung erscheint nicht mehr. DLG_DIFFERENTKEY_FINGERPRINT=Der Fingerabdruck des Schlüssels: DLG_DIFFERENTKEY_REPLACE=Den vorhanden Schlüssel durch den neuen ersetzen. +; dlg diff type key +DLG_DIFFERENTTYPEKEY_TITLE=SICHERHEITSWARNUNG +DLG_DIFFERENTTYPEKEY_WARNINIG=Your known hosts list has an entry for the server "####################################", but the machine you have contacted has presented a DIFFERENT TYPE KEY to the one in your known hosts list. A hostile machine may be pretending to be the server. +DLG_DIFFERENTTYPEKEY_WARNINIG2=Wenn Sie auf 'Continue' klicken, wird der Server in die Liste aufgenommen und die Fehlermeldung erscheint nicht mehr. +DLG_DIFFERENTTYPEKEY_FINGERPRINT=Der Fingerabdruck des Schlüssels: +DLG_DIFFERENTTYPEKEY_ADD=Den Server zur "known hosts"-Liste hinzufügen. + ; dlg fwd edit DLG_FWD_TITLE=SSH-Port-Weiterleitung DLG_FWD_BANNER=Die Richtung der Port-Weiterleitung wählen: Modified: trunk/installer/release/lang/Japanese.lng =================================================================== --- trunk/installer/release/lang/Japanese.lng 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/installer/release/lang/Japanese.lng 2011-02-23 15:47:30 UTC (rev 4332) @@ -517,13 +517,20 @@ MSG_RHOSTS_NOTDEFAULT_ERROR=Rhosts FØÍWÌFØû®ÅÍÈ¢½ß, FØɸs·é©àµêܹñ.\nRhosts FØðTTSSH Ågp·éÉÍ, Rhosts FØðWÉÝèãTTSSH ðÄN®µ, Ú±OÉÝèj [©ç"SSH FØ..." ðIðµÄº³¢. MSG_NOAUTHMETHOD_ERROR=T[oÍTTSSH ªñ·éFØIvVðT|[gµÄ¢Ü¹ñ.\nڱͶçêÜ·. -; dlg diff host +; dlg diff type DLG_DIFFERENTKEY_TITLE=ZL eBx DLG_DIFFERENTKEY_WARNING=knows hostsXgÌT[o"####################################"ÌGgÆ, Ú±æÌzXg®ª *êvµÄ¢Ü¹ñ* «ÓðÁ½zXgª, Ú±µæ¤ÆµÄ¢éT[oÌÓèðµÄ¢éÂ\«à èÜ·ÌÅ, \ªÓµÄ¾³¢. DLG_DIFFERENTKEY_WARNING2=known hostsXgɱÌzXgðÇÁµÄ±s·éÆ, ñ©ç±ÌxÍoÈÈèÜ·. DLG_DIFFERENTKEY_FINGERPRINT=T[o¤ÌzXg®wä: -DLG_DIFFERENTKEY_REPLACE=ù¶Ì®ð, Vµ¢®Åã«·é(&R) +DLG_DIFFERENTKEY_ADD=ù¶Ì®ð, Vµ¢®Åã«·é(&R) +; dlg diff type key +DLG_DIFFERENTTYPEKEY_TITLE=ZL eBx +DLG_DIFFERENTTYPEKEY_WARNINIG=knows hostsXgÌT[o"####################################"ÌGgÆ, Ú±æÌzXg®ÌíÞª *êvµÄ¢Ü¹ñ* «ÓðÁ½zXgª, Ú±µæ¤ÆµÄ¢éT[oÌÓèðµÄ¢éÂ\«à èÜ·ÌÅ, \ªÓµÄ¾³¢. +DLG_DIFFERENTTYPEKEY_WARNINIG2=known hostsXgɱÌzXgðÇÁµÄ±s·éÆ, ñ©ç±ÌxÍoÈÈèÜ·. +DLG_DIFFERENTTYPEKEY_FINGERPRINT=T[o¤ÌzXg®wä: +DLG_DIFFERENTTYPEKEY_ADD=±ÌzXgðknown hostsXgÉÇÁ·é(&A) + ; dlg fwd edit DLG_FWD_TITLE=SSH|[g] DLG_FWD_BANNER=|[g]ðs¤ü«ÌIð: Modified: trunk/ttssh2/ttxssh/hosts.c =================================================================== --- trunk/ttssh2/ttxssh/hosts.c 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/ttssh2/ttxssh/hosts.c 2011-02-23 15:47:30 UTC (rev 4332) @@ -791,7 +791,10 @@ } // öJ®ªµ¢©ðØ·é -static BOOL match_key(PTInstVar pvar, Key *key) +// -1 ... ®Ì^ªá¤ +// 0 ... µÈ¢ +// 1 ... µ¢ +static int match_key(PTInstVar pvar, Key *key) { int bits; unsigned char FAR * exp; @@ -799,6 +802,10 @@ const EC_GROUP *group; const EC_POINT *pa, *pb; + if (pvar->hosts_state.hostkey.type != key->type) { + return -1; + } + switch (key->type) { case KEY_RSA1: // SSH1 host public key bits = key->bits; @@ -1219,29 +1226,17 @@ host_index += eat_to_end_of_pattern(data + host_index); } while (data[host_index] == ','); - // zXgªµÄv·éL[ª©Â©é - if (match_key(pvar, &key)) { - do_write = 1; - } // zXgªµÈ¢ - else if (!matched) { + if (!matched) { do_write = 1; } - // zXgªµ¢ and Ú±Ìo[Wªá¤ + // zXgªµ¢ else { - int rsa1_key_bits=0; - rsa1_key_bits = atoi(data + host_index + eat_spaces(data + host_index)); - - if (rsa1_key_bits > 0) { // t@CÌL[Í ssh1 - if (!SSHv1(pvar)) { - do_write = 1; - } + // ®Ì`®ªá¤ or v·éL[ + if (match_key(pvar, &key) != 0) { + do_write = 1; } - else { // t@CÌL[Í ssh2 - if (!SSHv2(pvar)) { - do_write = 1; - } - } + // ®Ì`®ª¯¶ÅvµÈ¢L[ÍXLbv³êé } } @@ -1496,6 +1491,113 @@ } } +// +// ¯¶zXgÅ®`®ªá¤ÌÇÁmF_CAO𪣠+// +static BOOL CALLBACK hosts_add2_dlg_proc(HWND dlg, UINT msg, WPARAM wParam, + LPARAM lParam) +{ + PTInstVar pvar; + LOGFONT logfont; + HFONT font; + char uimsg[MAX_UIMSG]; + + switch (msg) { + case WM_INITDIALOG: + pvar = (PTInstVar) lParam; + pvar->hosts_state.hosts_dialog = dlg; + SetWindowLong(dlg, DWL_USER, lParam); + + // ÇÁEu«·¦Æà init_hosts_dlg ðÄñÅ¢éÌÅA»ÌOÉZbg·éKvª é + GetWindowText(dlg, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_TITLE", pvar, uimsg); + SetWindowText(dlg, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDC_HOSTWARNING, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_WARNINIG", pvar, uimsg); + SetDlgItemText(dlg, IDC_HOSTWARNING, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDC_HOSTWARNING2, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_WARNINIG2", pvar, uimsg); + SetDlgItemText(dlg, IDC_HOSTWARNING2, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDC_HOSTFINGERPRINT, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_FINGERPRINT", pvar, uimsg); + SetDlgItemText(dlg, IDC_HOSTFINGERPRINT, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_ADD", pvar, uimsg); + SetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDC_CONTINUE, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("BTN_CONTINUE", pvar, uimsg); + SetDlgItemText(dlg, IDC_CONTINUE, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("BTN_DISCONNECT", pvar, uimsg); + SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg); + + init_hosts_dlg(pvar, dlg); + + font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); + GetObject(font, sizeof(LOGFONT), &logfont); + if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgHostsAddFont, pvar)) { + SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDC_FINGER_PRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); + } + else { + DlgHostsAddFont = NULL; + } + + // add host check box ÌftHgÍ off É·é + // SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0); + + return TRUE; /* because we do not set the focus */ + + case WM_COMMAND: + pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER); + + switch (LOWORD(wParam)) { + case IDC_CONTINUE: + if (IsDlgButtonChecked(dlg, IDC_ADDTOKNOWNHOSTS)) { + add_host_key(pvar); + } + + if (SSHv1(pvar)) { + SSH_notify_host_OK(pvar); + } else { // SSH2 + // SSH2ÅÍ ÆÅ SSH_notify_host_OK() ðÄÔB + } + + pvar->hosts_state.hosts_dialog = NULL; + + EndDialog(dlg, 1); + + if (DlgHostsAddFont != NULL) { + DeleteObject(DlgHostsAddFont); + } + + return TRUE; + + case IDCANCEL: /* kill the connection */ + pvar->hosts_state.hosts_dialog = NULL; + notify_closed_connection(pvar); + EndDialog(dlg, 0); + + if (DlgHostsAddFont != NULL) { + DeleteObject(DlgHostsAddFont); + } + + return TRUE; + + default: + return FALSE; + } + + default: + return FALSE; + } +} + void HOSTS_do_unknown_host_dialog(HWND wnd, PTInstVar pvar) { if (pvar->hosts_state.hosts_dialog == NULL) { @@ -1518,6 +1620,17 @@ } } +void HOSTS_do_different_type_key_dialog(HWND wnd, PTInstVar pvar) +{ + if (pvar->hosts_state.hosts_dialog == NULL) { + HWND cur_active = GetActiveWindow(); + + DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SSHDIFFERENTTYPEKEY), + cur_active != NULL ? cur_active : wnd, + hosts_add2_dlg_proc, (LPARAM) pvar); + } +} + // // T[o©ççêÄ«½zXgöJ®Ìëð`FbN·é // @@ -1525,12 +1638,12 @@ // BOOL HOSTS_check_host_key(PTInstVar pvar, char FAR * hostname, unsigned short tcpport, Key *key) { - int found_different_key = 0; + int found_different_key = 0, found_different_type_key = 0; // ·ÅÉ known_hosts t@C©çzXgöJ®ðÇÝñÅ¢éÈçA»êÆär·éB if (pvar->hosts_state.prefetched_hostname != NULL && _stricmp(pvar->hosts_state.prefetched_hostname, hostname) == 0 - && match_key(pvar, key)) { + && match_key(pvar, key) == 1) { if (SSHv1(pvar)) { SSH_notify_host_OK(pvar); @@ -1548,7 +1661,8 @@ } if (pvar->hosts_state.hostkey.type != KEY_UNSPEC) { - if (match_key(pvar, key)) { + int match = match_key(pvar, key); + if (match == 1) { finish_read_host_files(pvar, 0); // ·×ÄÌGgðQƵÄAv·éL[ª©Â©Á½çßéB // SSH2Ìêͱ±ÅͽàµÈ¢B(2006.3.29 yutaka) @@ -1558,10 +1672,15 @@ // SSH2ÅÍ ÆÅ SSH_notify_host_OK() ðÄÔB } return TRUE; - } else { + } + else if (match == 0) { // L[Í known_hosts ɩ©Á½ªAL[ÌàeªÙÈéB found_different_key = 1; } + else { + // L[Ì`®ªá¤ê + found_different_type_key = 1; + } } } while (pvar->hosts_state.hostkey.type != KEY_UNSPEC); // L[ª©Â©ÁÄ¢éÔÍ[v·é @@ -1608,7 +1727,11 @@ #else HOSTS_do_different_key_dialog(pvar->NotificationWindow, pvar); #endif - } else { + } + else if (found_different_type_key) { + HOSTS_do_different_type_key_dialog(pvar->NotificationWindow, pvar); + } + else { #if 0 PostMessage(pvar->NotificationWindow, WM_COMMAND, ID_SSHUNKNOWNHOST, 0); Modified: trunk/ttssh2/ttxssh/resource.h =================================================================== --- trunk/ttssh2/ttxssh/resource.h 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/ttssh2/ttxssh/resource.h 2011-02-23 15:47:30 UTC (rev 4332) @@ -22,6 +22,7 @@ #define IDD_SSHFWDSETUP 603 #define IDD_SSHFWDEDIT 604 #define IDD_SSHTISAUTH 605 +#define IDD_SSHDIFFERENTTYPEKEY 606 #define IDC_HOSTCOMLABEL 608 #define IDC_HOSTCOM 609 #define IDC_HOSTHELP 699 Modified: trunk/ttssh2/ttxssh/ttxssh.rc =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.rc 2011-02-23 15:04:13 UTC (rev 4331) +++ trunk/ttssh2/ttxssh/ttxssh.rc 2011-02-23 15:47:30 UTC (rev 4332) @@ -361,7 +361,23 @@ EDITTEXT IDC_CONFIRM_PASSWD,67,56,99,14,ES_PASSWORD | ES_AUTOHSCROLL END +IDD_SSHDIFFERENTTYPEKEY DIALOGEX 0, 0, 215, 242 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "SECURITY WARNING" +FONT 8, "Tahoma", 0, 0, 0x0 +BEGIN + LTEXT "Your known hosts list has an entry for the server ""####################################"", but the machine you have contacted has presented a DIFFERENT TYPE KEY to the one in your known hosts list. A hostile machine may be pretending to be the server.",IDC_HOSTWARNING,15,7,184,43 + LTEXT "If you choose to add this new key to the known hosts list and continue, then you will not receive this warning again.",IDC_HOSTWARNING2,15,48,184,24 + LTEXT "The server's host key fingerprint is:",IDC_HOSTFINGERPRINT,15,75,176,8 + EDITTEXT IDC_FINGER_PRINT,15,86,179,12,ES_AUTOHSCROLL | ES_READONLY + EDITTEXT IDC_FP_RANDOMART,14,105,181,97,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL + CONTROL "&Add this machine and its key to the known hosts list",IDC_ADDTOKNOWNHOSTS, + "Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,19,207,181,13 + DEFPUSHBUTTON "&Continue",IDC_CONTINUE,50,222,50,14,WS_GROUP + PUSHBUTTON "&Disconnect",IDCANCEL,115,222,50,14,WS_GROUP +END + ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -480,6 +496,14 @@ TOPMARGIN, 7 BOTTOMMARGIN, 88 END + + IDD_SSHDIFFERENTTYPEKEY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 208 + TOPMARGIN, 7 + BOTTOMMARGIN, 236 + END END #endif // APSTUDIO_INVOKED