| 42 |
|
|
| 43 |
#define MAX_AUTH_CONTROL IDC_SSHUSETIS |
#define MAX_AUTH_CONTROL IDC_SSHUSETIS |
| 44 |
|
|
| 45 |
#ifdef I18N |
#ifndef NO_I18N |
| 46 |
static HFONT DlgAuthFont; |
static HFONT DlgAuthFont; |
| 47 |
static HFONT DlgTisFont; |
static HFONT DlgTisFont; |
| 48 |
static HFONT DlgAuthSetupFont; |
static HFONT DlgAuthSetupFont; |
| 115 |
static void init_auth_machine_banner(PTInstVar pvar, HWND dlg) |
static void init_auth_machine_banner(PTInstVar pvar, HWND dlg) |
| 116 |
{ |
{ |
| 117 |
char buf[1024] = "Logging in to "; |
char buf[1024] = "Logging in to "; |
| 118 |
#ifdef I18N |
#ifndef NO_I18N |
| 119 |
char buf2[1024]; |
char buf2[1024]; |
| 120 |
GetDlgItemText(dlg, IDC_SSHAUTHBANNER, buf2, sizeof(buf2)); |
GetDlgItemText(dlg, IDC_SSHAUTHBANNER, buf2, sizeof(buf2)); |
| 121 |
_snprintf(buf, sizeof(buf), buf2, SSH_get_host_name(pvar)); |
_snprintf(buf, sizeof(buf), buf2, SSH_get_host_name(pvar)); |
| 182 |
{ |
{ |
| 183 |
int default_method = pvar->session_settings.DefaultAuthMethod; |
int default_method = pvar->session_settings.DefaultAuthMethod; |
| 184 |
|
|
| 185 |
#ifdef I18N |
#ifndef NO_I18N |
| 186 |
GetWindowText(dlg, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg)); |
GetWindowText(dlg, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg)); |
| 187 |
UTIL_get_lang_msg("DLG_AUTH_TITLE", pvar); |
UTIL_get_lang_msg("DLG_AUTH_TITLE", pvar); |
| 188 |
SetWindowText(dlg, pvar->ts->UIMsg); |
SetWindowText(dlg, pvar->ts->UIMsg); |
| 245 |
|
|
| 246 |
if (pvar->auth_state.failed_method != SSH_AUTH_NONE) { |
if (pvar->auth_state.failed_method != SSH_AUTH_NONE) { |
| 247 |
/* must be retrying a failed attempt */ |
/* must be retrying a failed attempt */ |
| 248 |
#ifdef I18N |
#ifndef NO_I18N |
| 249 |
strcpy(pvar->ts->UIMsg, "Authentication failed. Please retry."); |
strcpy(pvar->ts->UIMsg, "Authentication failed. Please retry."); |
| 250 |
UTIL_get_lang_msg("DLG_AUTH_BANNER2_FAILED", pvar); |
UTIL_get_lang_msg("DLG_AUTH_BANNER2_FAILED", pvar); |
| 251 |
SetDlgItemText(dlg, IDC_SSHAUTHBANNER2, "Retrying SSH Authentication"); |
SetDlgItemText(dlg, IDC_SSHAUTHBANNER2, "Retrying SSH Authentication"); |
| 347 |
// パスワード認証を試す前に、keyboard-interactiveメソッドを試す場合は、ラベル名を |
// パスワード認証を試す前に、keyboard-interactiveメソッドを試す場合は、ラベル名を |
| 348 |
// 変更する。(2005.3.12 yutaka) |
// 変更する。(2005.3.12 yutaka) |
| 349 |
if (pvar->settings.ssh2_keyboard_interactive == 1) { |
if (pvar->settings.ssh2_keyboard_interactive == 1) { |
| 350 |
#ifdef I18N |
#ifndef NO_I18N |
| 351 |
strcpy(pvar->ts->UIMsg, "Use p&lain password to log in (with keyboard-interactive)"); |
strcpy(pvar->ts->UIMsg, "Use p&lain password to log in (with keyboard-interactive)"); |
| 352 |
UTIL_get_lang_msg("DLG_AUTH_METHOD_PASSWORD_KBDINT", pvar); |
UTIL_get_lang_msg("DLG_AUTH_METHOD_PASSWORD_KBDINT", pvar); |
| 353 |
SetDlgItemText(dlg, IDC_SSHUSEPASSWORD, pvar->ts->UIMsg); |
SetDlgItemText(dlg, IDC_SSHUSEPASSWORD, pvar->ts->UIMsg); |
| 357 |
} |
} |
| 358 |
|
|
| 359 |
if (pvar->settings.ssh_protocol_version == 1) { |
if (pvar->settings.ssh_protocol_version == 1) { |
| 360 |
#ifdef I18N |
#ifndef NO_I18N |
| 361 |
strcpy(pvar->ts->UIMsg, "Use challenge/response to log in(&TIS)"); |
strcpy(pvar->ts->UIMsg, "Use challenge/response to log in(&TIS)"); |
| 362 |
UTIL_get_lang_msg("DLG_AUTH_METHOD_CHALLENGE1", pvar); |
UTIL_get_lang_msg("DLG_AUTH_METHOD_CHALLENGE1", pvar); |
| 363 |
SetDlgItemText(dlg, IDC_SSHUSETIS, pvar->ts->UIMsg); |
SetDlgItemText(dlg, IDC_SSHUSETIS, pvar->ts->UIMsg); |
| 365 |
SetDlgItemText(dlg, IDC_SSHUSETIS, "Use challenge/response to log in(&TIS)"); |
SetDlgItemText(dlg, IDC_SSHUSETIS, "Use challenge/response to log in(&TIS)"); |
| 366 |
#endif |
#endif |
| 367 |
} else { |
} else { |
| 368 |
#ifdef I18N |
#ifndef NO_I18N |
| 369 |
strcpy(pvar->ts->UIMsg, "Use &challenge/response to log in(keyboard-interactive)"); |
strcpy(pvar->ts->UIMsg, "Use &challenge/response to log in(keyboard-interactive)"); |
| 370 |
UTIL_get_lang_msg("DLG_AUTH_METHOD_CHALLENGE2", pvar); |
UTIL_get_lang_msg("DLG_AUTH_METHOD_CHALLENGE2", pvar); |
| 371 |
SetDlgItemText(dlg, IDC_SSHUSETIS, pvar->ts->UIMsg); |
SetDlgItemText(dlg, IDC_SSHUSETIS, pvar->ts->UIMsg); |
| 397 |
return result; |
return result; |
| 398 |
} |
} |
| 399 |
|
|
| 400 |
#ifdef I18N |
#ifndef NO_I18N |
| 401 |
static int get_key_file_name(HWND parent, char FAR * buf, int bufsize, PTInstVar pvar) |
static int get_key_file_name(HWND parent, char FAR * buf, int bufsize, PTInstVar pvar) |
| 402 |
#else |
#else |
| 403 |
static int get_key_file_name(HWND parent, char FAR * buf, int bufsize) |
static int get_key_file_name(HWND parent, char FAR * buf, int bufsize) |
| 406 |
#ifdef TERATERM32 |
#ifdef TERATERM32 |
| 407 |
OPENFILENAME params; |
OPENFILENAME params; |
| 408 |
char fullname_buf[2048] = "identity"; |
char fullname_buf[2048] = "identity"; |
| 409 |
#ifdef I18N |
#ifndef NO_I18N |
| 410 |
char filter[MAX_UIMSG]; |
char filter[MAX_UIMSG]; |
| 411 |
#endif |
#endif |
| 412 |
|
|
| 415 |
params.hwndOwner = parent; |
params.hwndOwner = parent; |
| 416 |
// フィルタの追加 (2004.12.19 yutaka) |
// フィルタの追加 (2004.12.19 yutaka) |
| 417 |
// 3ファイルフィルタの追加 (2005.4.26 yutaka) |
// 3ファイルフィルタの追加 (2005.4.26 yutaka) |
| 418 |
#ifdef I18N |
#ifndef NO_I18N |
| 419 |
strncpy(pvar->ts->UIMsg, "identity files\\0identity;id_rsa;id_dsa\\0identity(RSA1)\\0identity\\0id_rsa(SSH2)\\0id_rsa\\0id_dsa(SSH2)\\0id_dsa\\0all(*.*)\\0*.*\\0\\0", sizeof(pvar->ts->UIMsg)); |
strncpy(pvar->ts->UIMsg, "identity files\\0identity;id_rsa;id_dsa\\0identity(RSA1)\\0identity\\0id_rsa(SSH2)\\0id_rsa\\0id_dsa(SSH2)\\0id_dsa\\0all(*.*)\\0*.*\\0\\0", sizeof(pvar->ts->UIMsg)); |
| 420 |
UTIL_get_lang_msg("FILEDLG_OPEN_PRIVATEKEY_FILTER", pvar); |
UTIL_get_lang_msg("FILEDLG_OPEN_PRIVATEKEY_FILTER", pvar); |
| 421 |
memcpy(filter, pvar->ts->UIMsg, sizeof(filter)); |
memcpy(filter, pvar->ts->UIMsg, sizeof(filter)); |
| 430 |
params.nMaxFile = sizeof(fullname_buf); |
params.nMaxFile = sizeof(fullname_buf); |
| 431 |
params.lpstrFileTitle = NULL; |
params.lpstrFileTitle = NULL; |
| 432 |
params.lpstrInitialDir = NULL; |
params.lpstrInitialDir = NULL; |
| 433 |
#ifdef I18N |
#ifndef NO_I18N |
| 434 |
strcpy(pvar->ts->UIMsg, "Choose a file with the RSA/DSA private key"); |
strcpy(pvar->ts->UIMsg, "Choose a file with the RSA/DSA private key"); |
| 435 |
UTIL_get_lang_msg("FILEDLG_OPEN_PRIVATEKEY_TITLE", pvar); |
UTIL_get_lang_msg("FILEDLG_OPEN_PRIVATEKEY_TITLE", pvar); |
| 436 |
params.lpstrTitle = pvar->ts->UIMsg; |
params.lpstrTitle = pvar->ts->UIMsg; |
| 452 |
#endif |
#endif |
| 453 |
} |
} |
| 454 |
|
|
| 455 |
#ifdef I18N |
#ifndef NO_I18N |
| 456 |
static void choose_RSA_key_file(HWND dlg, PTInstVar pvar) |
static void choose_RSA_key_file(HWND dlg, PTInstVar pvar) |
| 457 |
#else |
#else |
| 458 |
static void choose_RSA_key_file(HWND dlg) |
static void choose_RSA_key_file(HWND dlg) |
| 460 |
{ |
{ |
| 461 |
char buf[1024]; |
char buf[1024]; |
| 462 |
|
|
| 463 |
#ifdef I18N |
#ifndef NO_I18N |
| 464 |
if (get_key_file_name(dlg, buf, sizeof(buf), pvar)) { |
if (get_key_file_name(dlg, buf, sizeof(buf), pvar)) { |
| 465 |
#else |
#else |
| 466 |
if (get_key_file_name(dlg, buf, sizeof(buf))) { |
if (get_key_file_name(dlg, buf, sizeof(buf))) { |
| 469 |
} |
} |
| 470 |
} |
} |
| 471 |
|
|
| 472 |
#ifdef I18N |
#ifndef NO_I18N |
| 473 |
static void choose_host_RSA_key_file(HWND dlg, PTInstVar pvar) |
static void choose_host_RSA_key_file(HWND dlg, PTInstVar pvar) |
| 474 |
#else |
#else |
| 475 |
static void choose_host_RSA_key_file(HWND dlg) |
static void choose_host_RSA_key_file(HWND dlg) |
| 477 |
{ |
{ |
| 478 |
char buf[1024]; |
char buf[1024]; |
| 479 |
|
|
| 480 |
#ifdef I18N |
#ifndef NO_I18N |
| 481 |
if (get_key_file_name(dlg, buf, sizeof(buf), pvar)) { |
if (get_key_file_name(dlg, buf, sizeof(buf), pvar)) { |
| 482 |
#else |
#else |
| 483 |
if (get_key_file_name(dlg, buf, sizeof(buf))) { |
if (get_key_file_name(dlg, buf, sizeof(buf))) { |
| 513 |
buf[0] = 0; |
buf[0] = 0; |
| 514 |
GetDlgItemText(dlg, file_ctl_ID, buf, sizeof(buf)); |
GetDlgItemText(dlg, file_ctl_ID, buf, sizeof(buf)); |
| 515 |
if (buf[0] == 0) { |
if (buf[0] == 0) { |
| 516 |
#ifdef I18N |
#ifndef NO_I18N |
| 517 |
strcpy(pvar->ts->UIMsg, "You must specify a file containing the RSA/DSA private key."); |
strcpy(pvar->ts->UIMsg, "You must specify a file containing the RSA/DSA private key."); |
| 518 |
UTIL_get_lang_msg("MSG_KEYSPECIFY_ERROR", pvar); |
UTIL_get_lang_msg("MSG_KEYSPECIFY_ERROR", pvar); |
| 519 |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 562 |
|
|
| 563 |
if (key_pair == NULL) { // read error |
if (key_pair == NULL) { // read error |
| 564 |
char buf[1024]; |
char buf[1024]; |
| 565 |
#ifdef I18N |
#ifndef NO_I18N |
| 566 |
strcpy(pvar->ts->UIMsg, "read error SSH2 private key file\r\n%s"); |
strcpy(pvar->ts->UIMsg, "read error SSH2 private key file\r\n%s"); |
| 567 |
UTIL_get_lang_msg("MSG_READKEY_ERROR", pvar); |
UTIL_get_lang_msg("MSG_READKEY_ERROR", pvar); |
| 568 |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, errmsg); |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, errmsg); |
| 615 |
} |
} |
| 616 |
if (method == SSH_AUTH_RHOSTS || method == SSH_AUTH_RHOSTS_RSA) { |
if (method == SSH_AUTH_RHOSTS || method == SSH_AUTH_RHOSTS_RSA) { |
| 617 |
if (pvar->session_settings.DefaultAuthMethod != SSH_AUTH_RHOSTS) { |
if (pvar->session_settings.DefaultAuthMethod != SSH_AUTH_RHOSTS) { |
| 618 |
#ifdef I18N |
#ifndef NO_I18N |
| 619 |
strcpy(pvar->ts->UIMsg, "Rhosts authentication will probably fail because it was not " |
strcpy(pvar->ts->UIMsg, "Rhosts authentication will probably fail because it was not " |
| 620 |
"the default authentication method.\n" |
"the default authentication method.\n" |
| 621 |
"To use Rhosts authentication " |
"To use Rhosts authentication " |
| 662 |
} |
} |
| 663 |
|
|
| 664 |
EndDialog(dlg, 1); |
EndDialog(dlg, 1); |
| 665 |
#ifdef I18N |
#ifndef NO_I18N |
| 666 |
if (DlgAuthFont != NULL) { |
if (DlgAuthFont != NULL) { |
| 667 |
DeleteObject(DlgAuthFont); |
DeleteObject(DlgAuthFont); |
| 668 |
} |
} |
| 677 |
const int IDC_TIMER1 = 300; |
const int IDC_TIMER1 = 300; |
| 678 |
const int autologin_timeout = 10; // ミリ秒 |
const int autologin_timeout = 10; // ミリ秒 |
| 679 |
PTInstVar pvar; |
PTInstVar pvar; |
| 680 |
#ifdef I18N |
#ifndef NO_I18N |
| 681 |
LOGFONT logfont; |
LOGFONT logfont; |
| 682 |
HFONT font; |
HFONT font; |
| 683 |
#endif |
#endif |
| 690 |
|
|
| 691 |
init_auth_dlg(pvar, dlg); |
init_auth_dlg(pvar, dlg); |
| 692 |
|
|
| 693 |
#ifdef I18N |
#ifndef NO_I18N |
| 694 |
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
| 695 |
GetObject(font, sizeof(LOGFONT), &logfont); |
GetObject(font, sizeof(LOGFONT), &logfont); |
| 696 |
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgAuthFont, pvar)) { |
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgAuthFont, pvar)) { |
| 751 |
notify_closed_connection(pvar); |
notify_closed_connection(pvar); |
| 752 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 753 |
|
|
| 754 |
#ifdef I18N |
#ifndef NO_I18N |
| 755 |
if (DlgAuthFont != NULL) { |
if (DlgAuthFont != NULL) { |
| 756 |
DeleteObject(DlgAuthFont); |
DeleteObject(DlgAuthFont); |
| 757 |
} |
} |
| 767 |
return TRUE; |
return TRUE; |
| 768 |
|
|
| 769 |
case IDC_CHOOSERSAFILE: |
case IDC_CHOOSERSAFILE: |
| 770 |
#ifdef I18N |
#ifndef NO_I18N |
| 771 |
choose_RSA_key_file(dlg, pvar); |
choose_RSA_key_file(dlg, pvar); |
| 772 |
#else |
#else |
| 773 |
choose_RSA_key_file(dlg); |
choose_RSA_key_file(dlg); |
| 775 |
return TRUE; |
return TRUE; |
| 776 |
|
|
| 777 |
case IDC_CHOOSEHOSTRSAFILE: |
case IDC_CHOOSEHOSTRSAFILE: |
| 778 |
#ifdef I18N |
#ifndef NO_I18N |
| 779 |
choose_host_RSA_key_file(dlg, pvar); |
choose_host_RSA_key_file(dlg, pvar); |
| 780 |
#else |
#else |
| 781 |
choose_host_RSA_key_file(dlg); |
choose_host_RSA_key_file(dlg); |
| 822 |
pvar->auth_state.supported_types = types; |
pvar->auth_state.supported_types = types; |
| 823 |
|
|
| 824 |
if (types == 0) { |
if (types == 0) { |
| 825 |
#ifdef I18N |
#ifndef NO_I18N |
| 826 |
strcpy(pvar->ts->UIMsg, |
strcpy(pvar->ts->UIMsg, |
| 827 |
"Server does not support any of the authentication options\n" |
"Server does not support any of the authentication options\n" |
| 828 |
"provided by TTSSH. This connection will now close."); |
"provided by TTSSH. This connection will now close."); |
| 950 |
|
|
| 951 |
static void init_TIS_dlg(PTInstVar pvar, HWND dlg) |
static void init_TIS_dlg(PTInstVar pvar, HWND dlg) |
| 952 |
{ |
{ |
| 953 |
#ifdef I18N |
#ifndef NO_I18N |
| 954 |
GetWindowText(dlg, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg)); |
GetWindowText(dlg, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg)); |
| 955 |
UTIL_get_lang_msg("DLG_TIS_TITLE", pvar); |
UTIL_get_lang_msg("DLG_TIS_TITLE", pvar); |
| 956 |
SetWindowText(dlg, pvar->ts->UIMsg); |
SetWindowText(dlg, pvar->ts->UIMsg); |
| 1006 |
LPARAM lParam) |
LPARAM lParam) |
| 1007 |
{ |
{ |
| 1008 |
PTInstVar pvar; |
PTInstVar pvar; |
| 1009 |
#ifdef I18N |
#ifndef NO_I18N |
| 1010 |
LOGFONT logfont; |
LOGFONT logfont; |
| 1011 |
HFONT font; |
HFONT font; |
| 1012 |
#endif |
#endif |
| 1019 |
|
|
| 1020 |
init_TIS_dlg(pvar, dlg); |
init_TIS_dlg(pvar, dlg); |
| 1021 |
|
|
| 1022 |
#ifdef I18N |
#ifndef NO_I18N |
| 1023 |
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
| 1024 |
GetObject(font, sizeof(LOGFONT), &logfont); |
GetObject(font, sizeof(LOGFONT), &logfont); |
| 1025 |
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgTisFont, pvar)) { |
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgTisFont, pvar)) { |
| 1041 |
|
|
| 1042 |
switch (LOWORD(wParam)) { |
switch (LOWORD(wParam)) { |
| 1043 |
case IDOK: |
case IDOK: |
| 1044 |
#ifdef I18N |
#ifndef NO_I18N |
| 1045 |
if (DlgTisFont != NULL) { |
if (DlgTisFont != NULL) { |
| 1046 |
DeleteObject(DlgTisFont); |
DeleteObject(DlgTisFont); |
| 1047 |
} |
} |
| 1054 |
notify_closed_connection(pvar); |
notify_closed_connection(pvar); |
| 1055 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 1056 |
|
|
| 1057 |
#ifdef I18N |
#ifndef NO_I18N |
| 1058 |
if (DlgTisFont != NULL) { |
if (DlgTisFont != NULL) { |
| 1059 |
DeleteObject(DlgTisFont); |
DeleteObject(DlgTisFont); |
| 1060 |
} |
} |
| 1093 |
cur_active != |
cur_active != |
| 1094 |
NULL ? cur_active : pvar->NotificationWindow, |
NULL ? cur_active : pvar->NotificationWindow, |
| 1095 |
dlg_proc, (LPARAM) pvar) == -1) { |
dlg_proc, (LPARAM) pvar) == -1) { |
| 1096 |
#ifdef I18N |
#ifndef NO_I18N |
| 1097 |
strcpy(pvar->ts->UIMsg, |
strcpy(pvar->ts->UIMsg, |
| 1098 |
"Unable to display authentication dialog box.\n" |
"Unable to display authentication dialog box.\n" |
| 1099 |
"Connection terminated."); |
"Connection terminated."); |
| 1110 |
|
|
| 1111 |
static void init_default_auth_dlg(PTInstVar pvar, HWND dlg) |
static void init_default_auth_dlg(PTInstVar pvar, HWND dlg) |
| 1112 |
{ |
{ |
| 1113 |
#ifdef I18N |
#ifndef NO_I18N |
| 1114 |
GetWindowText(dlg, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg)); |
GetWindowText(dlg, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg)); |
| 1115 |
UTIL_get_lang_msg("DLG_AUTHSETUP_TITLE", pvar); |
UTIL_get_lang_msg("DLG_AUTHSETUP_TITLE", pvar); |
| 1116 |
SetWindowText(dlg, pvar->ts->UIMsg); |
SetWindowText(dlg, pvar->ts->UIMsg); |
| 1246 |
WPARAM wParam, LPARAM lParam) |
WPARAM wParam, LPARAM lParam) |
| 1247 |
{ |
{ |
| 1248 |
PTInstVar pvar; |
PTInstVar pvar; |
| 1249 |
#ifdef I18N |
#ifndef NO_I18N |
| 1250 |
LOGFONT logfont; |
LOGFONT logfont; |
| 1251 |
HFONT font; |
HFONT font; |
| 1252 |
#endif |
#endif |
| 1258 |
|
|
| 1259 |
init_default_auth_dlg(pvar, dlg); |
init_default_auth_dlg(pvar, dlg); |
| 1260 |
|
|
| 1261 |
#ifdef I18N |
#ifndef NO_I18N |
| 1262 |
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
| 1263 |
GetObject(font, sizeof(LOGFONT), &logfont); |
GetObject(font, sizeof(LOGFONT), &logfont); |
| 1264 |
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgAuthSetupFont, pvar)) { |
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgAuthSetupFont, pvar)) { |
| 1292 |
switch (LOWORD(wParam)) { |
switch (LOWORD(wParam)) { |
| 1293 |
case IDOK: |
case IDOK: |
| 1294 |
|
|
| 1295 |
#ifdef I18N |
#ifndef NO_I18N |
| 1296 |
if (DlgAuthSetupFont != NULL) { |
if (DlgAuthSetupFont != NULL) { |
| 1297 |
DeleteObject(DlgAuthSetupFont); |
DeleteObject(DlgAuthSetupFont); |
| 1298 |
} |
} |
| 1303 |
case IDCANCEL: |
case IDCANCEL: |
| 1304 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 1305 |
|
|
| 1306 |
#ifdef I18N |
#ifndef NO_I18N |
| 1307 |
if (DlgAuthSetupFont != NULL) { |
if (DlgAuthSetupFont != NULL) { |
| 1308 |
DeleteObject(DlgAuthSetupFont); |
DeleteObject(DlgAuthSetupFont); |
| 1309 |
} |
} |
| 1312 |
return TRUE; |
return TRUE; |
| 1313 |
|
|
| 1314 |
case IDC_CHOOSERSAFILE: |
case IDC_CHOOSERSAFILE: |
| 1315 |
#ifdef I18N |
#ifndef NO_I18N |
| 1316 |
choose_RSA_key_file(dlg, pvar); |
choose_RSA_key_file(dlg, pvar); |
| 1317 |
#else |
#else |
| 1318 |
choose_RSA_key_file(dlg); |
choose_RSA_key_file(dlg); |
| 1320 |
return TRUE; |
return TRUE; |
| 1321 |
|
|
| 1322 |
case IDC_CHOOSEHOSTRSAFILE: |
case IDC_CHOOSEHOSTRSAFILE: |
| 1323 |
#ifdef I18N |
#ifndef NO_I18N |
| 1324 |
choose_host_RSA_key_file(dlg, pvar); |
choose_host_RSA_key_file(dlg, pvar); |
| 1325 |
#else |
#else |
| 1326 |
choose_host_RSA_key_file(dlg); |
choose_host_RSA_key_file(dlg); |
| 1379 |
cur_active != |
cur_active != |
| 1380 |
NULL ? cur_active : pvar->NotificationWindow, |
NULL ? cur_active : pvar->NotificationWindow, |
| 1381 |
default_auth_dlg_proc, (LPARAM) pvar) == -1) { |
default_auth_dlg_proc, (LPARAM) pvar) == -1) { |
| 1382 |
#ifdef I18N |
#ifndef NO_I18N |
| 1383 |
strcpy(pvar->ts->UIMsg, "Unable to display authentication setup dialog box."); |
strcpy(pvar->ts->UIMsg, "Unable to display authentication setup dialog box."); |
| 1384 |
UTIL_get_lang_msg("MSG_CREATEWINDOW_AUTHSETUP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_CREATEWINDOW_AUTHSETUP_ERROR", pvar); |
| 1385 |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 1426 |
strncpy(dest, "None", len); |
strncpy(dest, "None", len); |
| 1427 |
} else if (pvar->auth_state.cur_cred.method != SSH_AUTH_NONE) { |
} else if (pvar->auth_state.cur_cred.method != SSH_AUTH_NONE) { |
| 1428 |
if (SSHv1(pvar)) { |
if (SSHv1(pvar)) { |
| 1429 |
#ifdef I18N |
#ifndef NO_I18N |
| 1430 |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
| 1431 |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
| 1432 |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, |
| 1448 |
} else { |
} else { |
| 1449 |
method = get_auth_method_name(pvar->auth_state.cur_cred.method); |
method = get_auth_method_name(pvar->auth_state.cur_cred.method); |
| 1450 |
} |
} |
| 1451 |
#ifdef I18N |
#ifndef NO_I18N |
| 1452 |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
| 1453 |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
| 1454 |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, method); |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, method); |
| 1462 |
} else if (pvar->auth_state.cur_cred.key_pair->DSA_key != NULL) { |
} else if (pvar->auth_state.cur_cred.key_pair->DSA_key != NULL) { |
| 1463 |
method = "DSA"; |
method = "DSA"; |
| 1464 |
} |
} |
| 1465 |
#ifdef I18N |
#ifndef NO_I18N |
| 1466 |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
| 1467 |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
| 1468 |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, method); |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, method); |
| 1474 |
} |
} |
| 1475 |
|
|
| 1476 |
} else { |
} else { |
| 1477 |
#ifdef I18N |
#ifndef NO_I18N |
| 1478 |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
strcpy(pvar->ts->UIMsg, "User '%s', using %s"); |
| 1479 |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_AUTH_INFO", pvar); |
| 1480 |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, |
_snprintf(dest, len, pvar->ts->UIMsg, pvar->auth_state.user, |
| 1507 |
|
|
| 1508 |
/* |
/* |
| 1509 |
* $Log: not supported by cvs2svn $ |
* $Log: not supported by cvs2svn $ |
| 1510 |
|
* Revision 1.32 2007/03/17 11:53:29 doda |
| 1511 |
|
* プレインテキスト認証と一緒にキーボードインタラクティブ認証を使用するように設定している時、SSH認証ダイアログでプレインテキスト認証がrhosts認証と表示されるのを修正した。 |
| 1512 |
|
* |
| 1513 |
* Revision 1.31 2007/02/17 17:31:55 yasuhide |
* Revision 1.31 2007/02/17 17:31:55 yasuhide |
| 1514 |
* コマンドラインでask4passwd が指定された時、ログインダイアログのパスフレーズ入力にフォーカスする |
* コマンドラインでask4passwd が指定された時、ログインダイアログのパスフレーズ入力にフォーカスする |
| 1515 |
* |
* |