| 70 |
static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| 71 |
|
|
| 72 |
|
|
|
BOOL HOSTS_resume_session_after_known_hosts(PTInstVar pvar); |
|
|
void HOSTS_cancel_session_after_known_hosts(PTInstVar pvar); |
|
|
|
|
|
|
|
| 73 |
static wchar_t **parse_multi_path(wchar_t *buf) |
static wchar_t **parse_multi_path(wchar_t *buf) |
| 74 |
{ |
{ |
| 75 |
int i; |
int i; |
| 1863 |
* known_hostsダイアログのために一時停止していた |
* known_hostsダイアログのために一時停止していた |
| 1864 |
* SSHサーバとのネゴシエーションを再開させる。 |
* SSHサーバとのネゴシエーションを再開させる。 |
| 1865 |
*/ |
*/ |
| 1866 |
HOSTS_resume_session_after_known_hosts(pvar); |
SSH_notify_host_OK(pvar); |
| 1867 |
|
|
| 1868 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1869 |
|
|
| 1872 |
|
|
| 1873 |
case IDCANCEL: /* kill the connection */ |
case IDCANCEL: /* kill the connection */ |
| 1874 |
canceled: |
canceled: |
|
/* |
|
|
* known_hostsをキャンセルするため、再開用のリソースを破棄しておく。 |
|
|
*/ |
|
|
HOSTS_cancel_session_after_known_hosts(pvar); |
|
|
|
|
| 1875 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1876 |
notify_closed_connection(pvar, "authentication cancelled"); |
notify_closed_connection(pvar, "authentication cancelled"); |
| 1877 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 1882 |
* known_hosts中にサーバ側からネットワーク切断された場合、 |
* known_hosts中にサーバ側からネットワーク切断された場合、 |
| 1883 |
* ダイアログのみを閉じる。 |
* ダイアログのみを閉じる。 |
| 1884 |
*/ |
*/ |
|
HOSTS_cancel_session_after_known_hosts(pvar); |
|
|
|
|
| 1885 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 1886 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 1887 |
return TRUE; |
return TRUE; |
| 2011 |
* known_hostsダイアログのために一時停止していた |
* known_hostsダイアログのために一時停止していた |
| 2012 |
* SSHサーバとのネゴシエーションを再開させる。 |
* SSHサーバとのネゴシエーションを再開させる。 |
| 2013 |
*/ |
*/ |
| 2014 |
HOSTS_resume_session_after_known_hosts(pvar); |
SSH_notify_host_OK(pvar); |
| 2015 |
|
|
| 2016 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2017 |
|
|
| 2020 |
|
|
| 2021 |
case IDCANCEL: /* kill the connection */ |
case IDCANCEL: /* kill the connection */ |
| 2022 |
canceled: |
canceled: |
|
/* |
|
|
* known_hostsをキャンセルするため、再開用のリソースを破棄しておく。 |
|
|
*/ |
|
|
HOSTS_cancel_session_after_known_hosts(pvar); |
|
|
|
|
| 2023 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2024 |
notify_closed_connection(pvar, "authentication cancelled"); |
notify_closed_connection(pvar, "authentication cancelled"); |
| 2025 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 2030 |
* known_hosts中にサーバ側からネットワーク切断された場合、 |
* known_hosts中にサーバ側からネットワーク切断された場合、 |
| 2031 |
* ダイアログのみを閉じる。 |
* ダイアログのみを閉じる。 |
| 2032 |
*/ |
*/ |
|
HOSTS_cancel_session_after_known_hosts(pvar); |
|
|
|
|
| 2033 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2034 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 2035 |
return TRUE; |
return TRUE; |
| 2160 |
* known_hostsダイアログのために一時停止していた |
* known_hostsダイアログのために一時停止していた |
| 2161 |
* SSHサーバとのネゴシエーションを再開させる。 |
* SSHサーバとのネゴシエーションを再開させる。 |
| 2162 |
*/ |
*/ |
| 2163 |
HOSTS_resume_session_after_known_hosts(pvar); |
SSH_notify_host_OK(pvar); |
| 2164 |
|
|
| 2165 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2166 |
|
|
| 2169 |
|
|
| 2170 |
case IDCANCEL: /* kill the connection */ |
case IDCANCEL: /* kill the connection */ |
| 2171 |
canceled: |
canceled: |
|
/* |
|
|
* known_hostsをキャンセルするため、再開用のリソースを破棄しておく。 |
|
|
*/ |
|
|
HOSTS_cancel_session_after_known_hosts(pvar); |
|
|
|
|
| 2172 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2173 |
notify_closed_connection(pvar, "authentication cancelled"); |
notify_closed_connection(pvar, "authentication cancelled"); |
| 2174 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 2179 |
* known_hosts中にサーバ側からネットワーク切断された場合、 |
* known_hosts中にサーバ側からネットワーク切断された場合、 |
| 2180 |
* ダイアログのみを閉じる。 |
* ダイアログのみを閉じる。 |
| 2181 |
*/ |
*/ |
|
HOSTS_cancel_session_after_known_hosts(pvar); |
|
|
|
|
| 2182 |
pvar->hosts_state.hosts_dialog = NULL; |
pvar->hosts_state.hosts_dialog = NULL; |
| 2183 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 2184 |
return TRUE; |
return TRUE; |
| 2391 |
return FALSE; |
return FALSE; |
| 2392 |
} |
} |
| 2393 |
|
|
|
/* |
|
|
* known_hostsダイアログでユーザ承認後、SSHサーバとのネゴシエーションを再開する。 |
|
|
*/ |
|
|
BOOL HOSTS_resume_session_after_known_hosts(PTInstVar pvar) |
|
|
{ |
|
|
enum ssh_kex_known_hosts type; |
|
|
int ret = FALSE; |
|
|
|
|
|
type = pvar->contents_after_known_hosts.kex_type; |
|
|
if (type == SSH1_PUBLIC_KEY_KNOWN_HOSTS) { |
|
|
ret = handle_server_public_key_after_known_hosts(pvar); |
|
|
|
|
|
} else if (type == SSH2_DH_KEX_REPLY_KNOWN_HOSTS) { |
|
|
ret = handle_SSH2_dh_kex_reply_after_known_hosts(pvar); |
|
|
|
|
|
} else if (type == SSH2_DH_GEX_REPLY_KNOWN_HOSTS) { |
|
|
ret = handle_SSH2_dh_gex_reply_after_known_hosts(pvar); |
|
|
|
|
|
} else if (type == SSH2_ECDH_KEX_REPLY_KNOWN_HOSTS) { |
|
|
ret = handle_SSH2_ecdh_kex_reply_after_known_hosts(pvar); |
|
|
|
|
|
} |
|
|
|
|
|
return (ret); |
|
|
} |
|
|
|
|
|
/* |
|
|
* known_hostsダイアログのSSHごとのキャンセル処理 |
|
|
*/ |
|
|
void HOSTS_cancel_session_after_known_hosts(PTInstVar pvar) |
|
|
{ |
|
|
enum ssh_kex_known_hosts type; |
|
|
|
|
|
type = pvar->contents_after_known_hosts.kex_type; |
|
|
if (type != NONE_KNOWN_HOSTS) { |
|
|
handle_SSH2_canel_reply_after_known_hosts(pvar); |
|
|
} |
|
|
|
|
|
return; |
|
|
} |
|
|
|
|
|
|
|
| 2394 |
void HOSTS_notify_disconnecting(PTInstVar pvar) |
void HOSTS_notify_disconnecting(PTInstVar pvar) |
| 2395 |
{ |
{ |
| 2396 |
if (pvar->hosts_state.hosts_dialog != NULL) { |
if (pvar->hosts_state.hosts_dialog != NULL) { |