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 7373 by doda, Thu Dec 27 10:54:03 2018 UTC revision 7477 by doda, Wed Mar 13 03:14:00 2019 UTC
# Line 1112  static void init_TIS_dlg(PTInstVar pvar, Line 1112  static void init_TIS_dlg(PTInstVar pvar,
1112                                             pvar->auth_state.TIS_prompt);                                             pvar->auth_state.TIS_prompt);
1113                  destroy_malloced_string(&pvar->auth_state.TIS_prompt);                  destroy_malloced_string(&pvar->auth_state.TIS_prompt);
1114          }          }
1115    
1116            if (pvar->auth_state.echo) {
1117                    SendMessage(GetDlgItem(dlg, IDC_SSHPASSWORD), EM_SETPASSWORDCHAR, 0, 0);
1118            }
1119  }  }
1120    
1121  static BOOL end_TIS_dlg(PTInstVar pvar, HWND dlg)  static BOOL end_TIS_dlg(PTInstVar pvar, HWND dlg)
# Line 1443  void AUTH_init(PTInstVar pvar) Line 1447  void AUTH_init(PTInstVar pvar)
1447          pvar->auth_state.user = NULL;          pvar->auth_state.user = NULL;
1448          pvar->auth_state.flags = 0;          pvar->auth_state.flags = 0;
1449          pvar->auth_state.TIS_prompt = NULL;          pvar->auth_state.TIS_prompt = NULL;
1450            pvar->auth_state.echo = 0;
1451          pvar->auth_state.supported_types = 0;          pvar->auth_state.supported_types = 0;
1452          pvar->auth_state.cur_cred.method = SSH_AUTH_NONE;          pvar->auth_state.cur_cred.method = SSH_AUTH_NONE;
1453          pvar->auth_state.cur_cred.password = NULL;          pvar->auth_state.cur_cred.password = NULL;
# Line 1457  void AUTH_set_generic_mode(PTInstVar pva Line 1462  void AUTH_set_generic_mode(PTInstVar pva
1462          destroy_malloced_string(&pvar->auth_state.TIS_prompt);          destroy_malloced_string(&pvar->auth_state.TIS_prompt);
1463  }  }
1464    
1465  void AUTH_set_TIS_mode(PTInstVar pvar, char *prompt, int len)  void AUTH_set_TIS_mode(PTInstVar pvar, char *prompt, int len, int echo)
1466  {  {
1467          if (pvar->auth_state.cur_cred.method == SSH_AUTH_TIS) {          if (pvar->auth_state.cur_cred.method == SSH_AUTH_TIS) {
1468                  pvar->auth_state.mode = TIS_AUTH_MODE;                  pvar->auth_state.mode = TIS_AUTH_MODE;
# Line 1466  void AUTH_set_TIS_mode(PTInstVar pvar, c Line 1471  void AUTH_set_TIS_mode(PTInstVar pvar, c
1471                  pvar->auth_state.TIS_prompt = malloc(len + 1);                  pvar->auth_state.TIS_prompt = malloc(len + 1);
1472                  memcpy(pvar->auth_state.TIS_prompt, prompt, len);                  memcpy(pvar->auth_state.TIS_prompt, prompt, len);
1473                  pvar->auth_state.TIS_prompt[len] = 0;                  pvar->auth_state.TIS_prompt[len] = 0;
1474                    pvar->auth_state.echo = echo;
1475          } else {          } else {
1476                  AUTH_set_generic_mode(pvar);                  AUTH_set_generic_mode(pvar);
1477          }          }

Legend:
Removed from v.7373  
changed lines
  Added in v.7477

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