-void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
- char *keystr, char *fingerprint)
+/* Helper function for verify_ssh_host_key(). */
+static VOID CALLBACK verify_ssh_host_key_help(LPHELPINFO lpHelpInfo)
+{
+ if (help_path) {
+ char *context = NULL;
+#define CHECK_CTX(name) \
+ do { \
+ if (lpHelpInfo->dwContextId == WINHELP_CTXID_ ## name) \
+ context = WINHELP_CTX_ ## name; \
+ } while (0)
+ CHECK_CTX(errors_hostkey_absent);
+ CHECK_CTX(errors_hostkey_changed);
+#undef CHECK_CTX
+ if (context) {
+ char *cmd = dupprintf("JI(`',`%s')", context);
+ WinHelp(hwnd, help_path, HELP_COMMAND, (DWORD)cmd);
+ sfree(cmd);
+ requested_help = TRUE;
+ }
+ }
+}
+
+int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
+ char *keystr, char *fingerprint,
+ void (*callback)(void *ctx, int result), void *ctx)