| 61 |
#define EndDialog(p1,p2) \ |
#define EndDialog(p1,p2) \ |
| 62 |
TTEndDialog(p1, p2) |
TTEndDialog(p1, p2) |
| 63 |
|
|
|
//static HFONT DlgHostsAddFont; |
|
|
//static HFONT DlgHostsReplaceFont; |
|
|
|
|
| 64 |
// BASE64構成文字列(ここでは'='は含まれていない) |
// BASE64構成文字列(ここでは'='は含まれていない) |
| 65 |
static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| 66 |
|
|
| 1707 |
LPARAM lParam) |
LPARAM lParam) |
| 1708 |
{ |
{ |
| 1709 |
PTInstVar pvar; |
PTInstVar pvar; |
|
// LOGFONT logfont; |
|
|
// HFONT font; |
|
| 1710 |
char uimsg[MAX_UIMSG]; |
char uimsg[MAX_UIMSG]; |
| 1711 |
|
|
| 1712 |
switch (msg) { |
switch (msg) { |
| 1779 |
} |
} |
| 1780 |
|
|
| 1781 |
init_hosts_dlg(pvar, dlg); |
init_hosts_dlg(pvar, dlg); |
|
#if 0 |
|
|
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_HOSTSSHFPCHECK, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTSSHFPDNSSEC, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_MD5, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_SHA256, 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; |
|
|
} |
|
|
#endif |
|
| 1782 |
// add host check boxにチェックをデフォルトで入れておく |
// add host check boxにチェックをデフォルトで入れておく |
| 1783 |
SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0); |
SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0); |
| 1784 |
|
|
| 1809 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1810 |
|
|
| 1811 |
EndDialog(dlg, 1); |
EndDialog(dlg, 1); |
|
#if 0 |
|
|
if (DlgHostsAddFont != NULL) { |
|
|
DeleteObject(DlgHostsAddFont); |
|
|
} |
|
|
#endif |
|
| 1812 |
return TRUE; |
return TRUE; |
| 1813 |
|
|
| 1814 |
case IDCANCEL: /* kill the connection */ |
case IDCANCEL: /* kill the connection */ |
| 1816 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1817 |
notify_closed_connection(pvar, "authentication cancelled"); |
notify_closed_connection(pvar, "authentication cancelled"); |
| 1818 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
|
#if 0 |
|
|
if (DlgHostsAddFont != NULL) { |
|
|
DeleteObject(DlgHostsAddFont); |
|
|
} |
|
|
#endif |
|
| 1819 |
return TRUE; |
return TRUE; |
| 1820 |
|
|
| 1821 |
case IDC_FP_HASH_ALG_MD5: |
case IDC_FP_HASH_ALG_MD5: |
| 1842 |
LPARAM lParam) |
LPARAM lParam) |
| 1843 |
{ |
{ |
| 1844 |
PTInstVar pvar; |
PTInstVar pvar; |
|
// LOGFONT logfont; |
|
|
// HFONT font; |
|
| 1845 |
char uimsg[MAX_UIMSG]; |
char uimsg[MAX_UIMSG]; |
| 1846 |
|
|
| 1847 |
switch (msg) { |
switch (msg) { |
| 1914 |
} |
} |
| 1915 |
|
|
| 1916 |
init_hosts_dlg(pvar, dlg); |
init_hosts_dlg(pvar, dlg); |
|
#if 0 |
|
|
font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); |
|
|
GetObject(font, sizeof(LOGFONT), &logfont); |
|
|
if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgHostsReplaceFont, pvar)) { |
|
|
SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTSSHFPCHECK, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTSSHFPDNSSEC, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_MD5, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_SHA256, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0)); |
|
|
} |
|
|
else { |
|
|
DlgHostsReplaceFont = NULL; |
|
|
} |
|
|
#endif |
|
| 1917 |
CenterWindow(dlg, GetParent(dlg)); |
CenterWindow(dlg, GetParent(dlg)); |
| 1918 |
// デフォルトでチェックは入れない |
// デフォルトでチェックは入れない |
| 1919 |
return TRUE; /* because we do not set the focus */ |
return TRUE; /* because we do not set the focus */ |
| 1942 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1943 |
|
|
| 1944 |
EndDialog(dlg, 1); |
EndDialog(dlg, 1); |
|
#if 0 |
|
|
if (DlgHostsReplaceFont != NULL) { |
|
|
DeleteObject(DlgHostsReplaceFont); |
|
|
} |
|
|
#endif |
|
| 1945 |
return TRUE; |
return TRUE; |
| 1946 |
|
|
| 1947 |
case IDCANCEL: /* kill the connection */ |
case IDCANCEL: /* kill the connection */ |
| 1949 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1950 |
notify_closed_connection(pvar, "authentication cancelled"); |
notify_closed_connection(pvar, "authentication cancelled"); |
| 1951 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
|
#if 0 |
|
|
if (DlgHostsReplaceFont != NULL) { |
|
|
DeleteObject(DlgHostsReplaceFont); |
|
|
} |
|
|
#endif |
|
| 1952 |
return TRUE; |
return TRUE; |
| 1953 |
|
|
| 1954 |
case IDC_FP_HASH_ALG_MD5: |
case IDC_FP_HASH_ALG_MD5: |
| 2049 |
} |
} |
| 2050 |
|
|
| 2051 |
init_hosts_dlg(pvar, dlg); |
init_hosts_dlg(pvar, dlg); |
|
#if 0 |
|
|
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_HOSTSSHFPCHECK, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTSSHFPDNSSEC, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_MD5, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0)); |
|
|
SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_SHA256, 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; |
|
|
} |
|
|
#endif |
|
| 2052 |
CenterWindow(dlg, GetParent(dlg)); |
CenterWindow(dlg, GetParent(dlg)); |
| 2053 |
// add host check box のデフォルトは off にする |
// add host check box のデフォルトは off にする |
| 2054 |
// SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0); |
// SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0); |
| 2078 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2079 |
|
|
| 2080 |
EndDialog(dlg, 1); |
EndDialog(dlg, 1); |
|
#if 0 |
|
|
if (DlgHostsAddFont != NULL) { |
|
|
DeleteObject(DlgHostsAddFont); |
|
|
} |
|
|
#endif |
|
| 2081 |
return TRUE; |
return TRUE; |
| 2082 |
|
|
| 2083 |
case IDCANCEL: /* kill the connection */ |
case IDCANCEL: /* kill the connection */ |
| 2085 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2086 |
notify_closed_connection(pvar, "authentication cancelled"); |
notify_closed_connection(pvar, "authentication cancelled"); |
| 2087 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
|
#if 0 |
|
|
if (DlgHostsAddFont != NULL) { |
|
|
DeleteObject(DlgHostsAddFont); |
|
|
} |
|
|
#endif |
|
| 2088 |
return TRUE; |
return TRUE; |
| 2089 |
|
|
| 2090 |
case IDC_FP_HASH_ALG_MD5: |
case IDC_FP_HASH_ALG_MD5: |