| 1 |
/* |
/* |
| 2 |
* Copyright (c) 1998-2001, Robert O'Callahan |
* Copyright (c) 1998-2001, Robert O'Callahan |
| 3 |
* (C) 2004-2017 TeraTerm Project |
* (C) 2004-2019 TeraTerm Project |
| 4 |
* All rights reserved. |
* All rights reserved. |
| 5 |
* |
* |
| 6 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
| 40 |
#include "hosts.h" |
#include "hosts.h" |
| 41 |
#include "dns.h" |
#include "dns.h" |
| 42 |
#include "dlglib.h" |
#include "dlglib.h" |
| 43 |
|
#include "compat_win.h" |
| 44 |
|
|
| 45 |
#include <openssl/bn.h> |
#include <openssl/bn.h> |
| 46 |
#include <openssl/evp.h> |
#include <openssl/evp.h> |
| 985 |
|
|
| 986 |
SetDlgItemText(dlg, IDC_HOSTWARNING, buf2); |
SetDlgItemText(dlg, IDC_HOSTWARNING, buf2); |
| 987 |
|
|
| 988 |
SendMessage(GetDlgItem(dlg, IDC_FP_RANDOMART), WM_SETFONT, (WPARAM)GetStockObject(ANSI_FIXED_FONT), TRUE); |
pvar->hFontFixed = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile); |
| 989 |
|
if (pvar->hFontFixed != NULL) { |
| 990 |
|
SendDlgItemMessage(dlg, IDC_FP_RANDOMART, WM_SETFONT, |
| 991 |
|
(WPARAM)pvar->hFontFixed, MAKELPARAM(TRUE,0)); |
| 992 |
|
} |
| 993 |
|
|
| 994 |
CheckDlgButton(dlg, IDC_FP_HASH_ALG_SHA256, TRUE); |
CheckDlgButton(dlg, IDC_FP_HASH_ALG_SHA256, TRUE); |
| 995 |
hosts_dlg_set_fingerprint(pvar, dlg, SSH_DIGEST_SHA256); |
hosts_dlg_set_fingerprint(pvar, dlg, SSH_DIGEST_SHA256); |
| 1835 |
return FALSE; |
return FALSE; |
| 1836 |
} |
} |
| 1837 |
|
|
| 1838 |
|
case WM_DPICHANGED: |
| 1839 |
|
pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER); |
| 1840 |
|
if (pvar->hFontFixed != NULL) { |
| 1841 |
|
DeleteObject(pvar->hFontFixed); |
| 1842 |
|
} |
| 1843 |
|
pvar->hFontFixed = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile); |
| 1844 |
|
if (pvar->hFontFixed != NULL) { |
| 1845 |
|
SendDlgItemMessage(dlg, IDC_FP_RANDOMART, WM_SETFONT, |
| 1846 |
|
(WPARAM)pvar->hFontFixed, MAKELPARAM(TRUE,0)); |
| 1847 |
|
} |
| 1848 |
|
return FALSE; |
| 1849 |
|
|
| 1850 |
|
case WM_DESTROY: |
| 1851 |
|
pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER); |
| 1852 |
|
if (pvar->hFontFixed != NULL) { |
| 1853 |
|
DeleteObject(pvar->hFontFixed); |
| 1854 |
|
pvar->hFontFixed = NULL; |
| 1855 |
|
} |
| 1856 |
|
return FALSE; |
| 1857 |
|
|
| 1858 |
default: |
default: |
| 1859 |
return FALSE; |
return FALSE; |
| 1860 |
} |
} |
| 1988 |
return FALSE; |
return FALSE; |
| 1989 |
} |
} |
| 1990 |
|
|
| 1991 |
|
case WM_DPICHANGED: |
| 1992 |
|
pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER); |
| 1993 |
|
if (pvar->hFontFixed != NULL) { |
| 1994 |
|
DeleteObject(pvar->hFontFixed); |
| 1995 |
|
} |
| 1996 |
|
pvar->hFontFixed = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile); |
| 1997 |
|
if (pvar->hFontFixed != NULL) { |
| 1998 |
|
SendDlgItemMessage(dlg, IDC_FP_RANDOMART, WM_SETFONT, |
| 1999 |
|
(WPARAM)pvar->hFontFixed, MAKELPARAM(TRUE,0)); |
| 2000 |
|
} |
| 2001 |
|
return FALSE; |
| 2002 |
|
|
| 2003 |
|
case WM_DESTROY: |
| 2004 |
|
pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER); |
| 2005 |
|
if (pvar->hFontFixed != NULL) { |
| 2006 |
|
DeleteObject(pvar->hFontFixed); |
| 2007 |
|
pvar->hFontFixed = NULL; |
| 2008 |
|
} |
| 2009 |
|
return FALSE; |
| 2010 |
|
|
| 2011 |
default: |
default: |
| 2012 |
return FALSE; |
return FALSE; |
| 2013 |
} |
} |
| 2020 |
LPARAM lParam) |
LPARAM lParam) |
| 2021 |
{ |
{ |
| 2022 |
PTInstVar pvar; |
PTInstVar pvar; |
|
// LOGFONT logfont; |
|
|
// HFONT font; |
|
| 2023 |
char uimsg[MAX_UIMSG]; |
char uimsg[MAX_UIMSG]; |
| 2024 |
|
|
| 2025 |
switch (msg) { |
switch (msg) { |
| 2142 |
return FALSE; |
return FALSE; |
| 2143 |
} |
} |
| 2144 |
|
|
| 2145 |
|
case WM_DPICHANGED: |
| 2146 |
|
pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER); |
| 2147 |
|
if (pvar->hFontFixed != NULL) { |
| 2148 |
|
DeleteObject(pvar->hFontFixed); |
| 2149 |
|
} |
| 2150 |
|
pvar->hFontFixed = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile); |
| 2151 |
|
if (pvar->hFontFixed != NULL) { |
| 2152 |
|
SendDlgItemMessage(dlg, IDC_FP_RANDOMART, WM_SETFONT, |
| 2153 |
|
(WPARAM)pvar->hFontFixed, MAKELPARAM(TRUE,0)); |
| 2154 |
|
} |
| 2155 |
|
return FALSE; |
| 2156 |
|
|
| 2157 |
|
case WM_DESTROY: |
| 2158 |
|
pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER); |
| 2159 |
|
if (pvar->hFontFixed != NULL) { |
| 2160 |
|
DeleteObject(pvar->hFontFixed); |
| 2161 |
|
pvar->hFontFixed = NULL; |
| 2162 |
|
} |
| 2163 |
|
return FALSE; |
| 2164 |
|
|
| 2165 |
default: |
default: |
| 2166 |
return FALSE; |
return FALSE; |
| 2167 |
} |
} |