Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/auth.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2799 by yutakakn, Sat Mar 12 12:08:05 2005 UTC revision 2800 by yutakakn, Sat Mar 12 15:07:34 2005 UTC
# Line 28  SOFTWARE, EVEN IF ADVISED OF THE POSSIBI Line 28  SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
28    
29  #include "ttxssh.h"  #include "ttxssh.h"
30  #include "util.h"  #include "util.h"
31    #include "ssh.h"
32    
33  #include <io.h>  #include <io.h>
34  #include <fcntl.h>  #include <fcntl.h>
# Line 239  static void init_auth_dlg(PTInstVar pvar Line 240  static void init_auth_dlg(PTInstVar pvar
240                  }                  }
241          }          }
242    
243    #if 1
244          // パスワード認証を試す前に、keyboard-interactiveメソッドを試す場合は、ラベル名を          // パスワード認証を試す前に、keyboard-interactiveメソッドを試す場合は、ラベル名を
245          // 変更する。(2005.3.12 yutaka)          // 変更する。(2005.3.12 yutaka)
246          if (pvar->settings.ssh2_keyboard_interactive == 1) {          if (pvar->settings.ssh2_keyboard_interactive == 1) {
247                  SetDlgItemText(dlg, IDC_SSHUSEPASSWORD, "Use p&lain password to log in (with keyboard-interactive)");                  SetDlgItemText(dlg, IDC_SSHUSEPASSWORD, "Use p&lain password to log in (with keyboard-interactive)");
248          }          }
249    
250            if (pvar->settings.ssh_protocol_version == 1) {
251                    SetDlgItemText(dlg, IDC_SSHUSETIS, "Use challenge/response to log in(&TIS)");
252            } else {
253                    SetDlgItemText(dlg, IDC_SSHUSETIS, "Use challenge/response to log in(keyboard-interactive)");
254            }
255    #endif
256    
257  }  }
258    
259  static char FAR *alloc_control_text(HWND ctl)  static char FAR *alloc_control_text(HWND ctl)
# Line 541  int AUTH_set_supported_auth_types(PTInst Line 550  int AUTH_set_supported_auth_types(PTInst
550                  // for SSH2(yutaka)                  // for SSH2(yutaka)
551  //              types &= (1 << SSH_AUTH_PASSWORD);  //              types &= (1 << SSH_AUTH_PASSWORD);
552                  // 公開鍵認証を有効にする (2004.12.18 yutaka)                  // 公開鍵認証を有効にする (2004.12.18 yutaka)
553                    // TISを追加。SSH2ではkeyboard-interactiveとして扱う。(2005.3.12 yutaka)
554                  types &= (1 << SSH_AUTH_PASSWORD) | (1 << SSH_AUTH_RSA)                  types &= (1 << SSH_AUTH_PASSWORD) | (1 << SSH_AUTH_RSA)
555                          | (1 << SSH_AUTH_DSA);                          | (1 << SSH_AUTH_DSA)
556                            | (1 << SSH_AUTH_TIS);
557          }          }
558          pvar->auth_state.supported_types = types;          pvar->auth_state.supported_types = types;
559    
# Line 689  static BOOL end_TIS_dlg(PTInstVar pvar, Line 700  static BOOL end_TIS_dlg(PTInstVar pvar,
700          pvar->auth_state.cur_cred.password = password;          pvar->auth_state.cur_cred.password = password;
701          pvar->auth_state.auth_dialog = NULL;          pvar->auth_state.auth_dialog = NULL;
702    
703            // add
704            if (SSHv2(pvar)) {
705                    pvar->keyboard_interactive_password_input = 1;
706                    handle_SSH2_userauth_inforeq(pvar);
707            }
708    
709          SSH_notify_cred(pvar);          SSH_notify_cred(pvar);
710    
711          EndDialog(dlg, 1);          EndDialog(dlg, 1);
# Line 968  void AUTH_get_auth_info(PTInstVar pvar, Line 985  void AUTH_get_auth_info(PTInstVar pvar,
985                          _snprintf(dest, len, "User '%s', using %s", pvar->auth_state.user,                          _snprintf(dest, len, "User '%s', using %s", pvar->auth_state.user,
986                                          get_auth_method_name(pvar->auth_state.cur_cred.method));                                          get_auth_method_name(pvar->auth_state.cur_cred.method));
987    
988                  } else { // SSH2:認証メソッドの判別 (2004.12.23 yutaka)                  } else {
989                          if (pvar->auth_state.cur_cred.method == SSH_AUTH_PASSWORD) {                          // SSH2:認証メソッドの判別 (2004.12.23 yutaka)
990                            // keyboard-interactiveメソッドを追加 (2005.3.12 yutaka)
991                            if (pvar->auth_state.cur_cred.method == SSH_AUTH_PASSWORD ||
992                                    pvar->auth_state.cur_cred.method == SSH_AUTH_TIS) {
993                                  // keyboard-interactiveメソッドを追加 (2005.1.24 yutaka)                                  // keyboard-interactiveメソッドを追加 (2005.1.24 yutaka)
994                                  if (pvar->keyboard_interactive_done == 1) {                                  if (pvar->keyboard_interactive_done == 1 ||
995                                            pvar->auth_state.cur_cred.method == SSH_AUTH_TIS) {
996                                          method = "keyboard-interactive";                                          method = "keyboard-interactive";
997                                  } else {                                  } else {
998                                          method = get_auth_method_name(pvar->auth_state.cur_cred.method);                                          method = get_auth_method_name(pvar->auth_state.cur_cred.method);
# Line 1016  void AUTH_end(PTInstVar pvar) Line 1037  void AUTH_end(PTInstVar pvar)
1037    
1038  /*  /*
1039   * $Log: not supported by cvs2svn $   * $Log: not supported by cvs2svn $
1040     * Revision 1.10  2005/03/12 12:08:05  yutakakn
1041     * パスワード認証の前に行うkeyboard-interactiveメソッドで、デフォルト設定値を無効(0)にした。
1042     * また、認証ダイアログのラベル名を設定の有無により変更するようにした。
1043     *
1044   * Revision 1.9  2005/02/22 08:48:11  yutakakn   * Revision 1.9  2005/02/22 08:48:11  yutakakn
1045   * TTSSH setupダイアログに HeartBeat 設定を追加。   * TTSSH setupダイアログに HeartBeat 設定を追加。
1046   * TTSSH authentication setupダイアログに keyboard-interactive 設定を追加。   * TTSSH authentication setupダイアログに keyboard-interactive 設定を追加。

Legend:
Removed from v.2799  
changed lines
  Added in v.2800

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26