}
}
-void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
- char *keystr, char *fingerprint)
+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)
{
int ret;
ret = verify_host_key(host, port, keytype, keystr);
if (ret == 0) /* success - key matched OK */
- return;
+ return 1;
if (ret == 2) { /* key was different */
int mbret;
mbox.lpszText = dupprintf(wrongmsg, appname, keytype, fingerprint,
if (mbret == IDYES)
store_host_key(host, port, keytype, keystr);
if (mbret == IDCANCEL)
- cleanup_exit(0);
+ return 0;
+ return 1;
}
if (ret == 1) { /* key was absent */
int mbret;
if (mbret == IDYES)
store_host_key(host, port, keytype, keystr);
if (mbret == IDCANCEL)
- cleanup_exit(0);
+ return 0;
+ return 1;
}
}
* Ask whether the selected algorithm is acceptable (since it was
* below the configured 'warn' threshold).
*/
-void askalg(void *frontend, const char *algtype, const char *algname)
+int askalg(void *frontend, const char *algtype, const char *algname,
+ void (*callback)(void *ctx, int result), void *ctx)
{
static const char mbtitle[] = "%s Security Alert";
static const char msg[] =
sfree(message);
sfree(title);
if (mbret == IDYES)
- return;
+ return 1;
else
- cleanup_exit(0);
+ return 0;
}
/*