[Ttssh2-commit] [3346] 認証処理を見直し

svnno****@sourc***** svnno****@sourc*****
2009年 4月 23日 (木) 12:54:52 JST


Revision: 3346
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3346
Author:   maya
Date:     2009-04-23 12:54:52 +0900 (Thu, 23 Apr 2009)

Log Message:
-----------
認証処理を見直し

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/auth.c


-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/auth.c
===================================================================
--- trunk/ttssh2/ttxssh/auth.c	2009-04-23 03:52:19 UTC (rev 3345)
+++ trunk/ttssh2/ttxssh/auth.c	2009-04-23 03:54:52 UTC (rev 3346)
@@ -723,6 +723,7 @@
 					// SSH1 ‚Ì‚Æ‚«
 					// ‚Ü‚½‚Í CheckAuthListFirst ‚ª FALSE ‚Ì‚Æ‚«
 					// ‚Ü‚½‚Í CheckAuthListFirst TRUE ‚ŁAauthlist ‚ª‹A‚Á‚Ä‚«‚½‚ ‚Æ
+					KillTimer(dlg, IDC_TIMER1);
 
 					// ƒ_ƒCƒAƒƒO‚̃†[ƒU–¼‚ðŽæ“¾‚·‚é
 					if (pvar->auth_state.user == NULL) {
@@ -730,16 +731,15 @@
 							alloc_control_text(GetDlgItem(dlg, IDC_SSHUSERNAME));
 					}
 
-					KillTimer(dlg, IDC_TIMER1);
 					SendMessage(dlg, WM_COMMAND, IDOK, 0);
 				}
 			}
 		}
 		else if (wParam == IDC_TIMER2) {
 			// authlist ‚𓾂邽‚ß
-			if (SSHv2(pvar)) {
-				if (!(pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) &&
-				    (pvar->ssh_state.status_flags & STATUS_HOST_OK)) {
+			if (!(pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) &&
+			    (pvar->ssh_state.status_flags & STATUS_HOST_OK)) {
+				if (SSHv2(pvar)) {
 					KillTimer(dlg, IDC_TIMER2);
 
 					// ƒ_ƒCƒAƒƒO‚̃†[ƒU–¼‚ðŽæ“¾‚·‚é
@@ -757,29 +757,29 @@
 					// TIS —p‚É OK ‚ð‰Ÿ‚·‚Ì‚Í”FØ‚ÉŽ¸”s‚µ‚½‚ ‚Æ‚É‚µ‚È‚¢‚Æ
 					// Unexpected SSH2 message ‚É‚È‚éB
 				}
-			}
-			else if (SSHv1(pvar)) {
-				KillTimer(dlg, IDC_TIMER2);
-				// TIS —p‚É OK ‚ð‰Ÿ‚·
-				if (pvar->ssh2_authmethod == SSH_AUTH_TIS) {
-					SendMessage(dlg, WM_COMMAND, IDOK, 0);
+				else if (SSHv1(pvar)) {
+					KillTimer(dlg, IDC_TIMER2);
+
+					// TIS —p‚É OK ‚ð‰Ÿ‚·
+					if (pvar->ssh2_authmethod == SSH_AUTH_TIS) {
+						SendMessage(dlg, WM_COMMAND, IDOK, 0);
+					}
+					// SSH1 ‚Å‚Í”FØƒƒ\ƒbƒh none ‚ð‘—‚ç‚È‚¢
 				}
-				// SSH1 ‚Å‚Í none ‚ð‘—‚ç‚È‚¢
+				// ƒvƒƒgƒRƒ‹ƒo[ƒWƒ‡ƒ“Šm’è‘O‚͉½‚à‚µ‚È‚¢
 			}
-			// ƒvƒƒgƒRƒ‹ƒo[ƒWƒ‡ƒ“Šm’è‘O‚͉½‚à‚µ‚È‚¢
 		}
 		else if (wParam == IDC_TIMER3) {
-			if (SSHv2(pvar) || SSHv1(pvar)) {
-				// TIS —p‚É OK ‚ð‰Ÿ‚·ƒ^ƒCƒ}[‚ðŽdŠ|‚¯‚é
-				if (pvar->ssh2_authmethod == SSH_AUTH_TIS) {
-					if (!(pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) &&
-					    (pvar->ssh_state.status_flags & STATUS_HOST_OK)) {
-						KillTimer(dlg, IDC_TIMER3);
-						SendMessage(dlg, WM_COMMAND, IDOK, 0);
-					}
+			if (!(pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) &&
+			    (pvar->ssh_state.status_flags & STATUS_HOST_OK)) {
+				if (SSHv2(pvar) || SSHv1(pvar)) {
+					KillTimer(dlg, IDC_TIMER3);
+
+					// TIS —p‚É OK ‚ð‰Ÿ‚·
+					SendMessage(dlg, WM_COMMAND, IDOK, 0);
 				}
+				// ƒvƒƒgƒRƒ‹ƒo[ƒWƒ‡ƒ“Šm’è‘O‚͉½‚à‚µ‚È‚¢
 			}
-			// ƒvƒƒgƒRƒ‹ƒo[ƒWƒ‡ƒ“Šm’è‘O‚͉½‚à‚µ‚È‚¢
 		}
 		return FALSE;
 



Ttssh2-commit メーリングリストの案内