"%s\n"
"If you trust this host, hit Yes to add the key to\n"
"PuTTY's cache and carry on connecting.\n"
- "If you do not trust this host, hit No to abandon the\n"
+ "If you want to carry on connecting just once, without\n"
+ "adding the key to the cache, hit No.\n"
+ "If you do not trust this host, hit Cancel to abandon the\n"
"connection.\n";
static const char wrongmsg[] =
static const char mbtitle[] = "PuTTY Security Alert";
-
char message[160 +
/* sensible fingerprint max size */
(sizeof(absentmsg) > sizeof(wrongmsg) ?
int mbret;
sprintf(message, absentmsg, fingerprint);
mbret = MessageBox(NULL, message, mbtitle,
- MB_ICONWARNING | MB_YESNO);
- if (mbret == IDNO)
+ MB_ICONWARNING | MB_YESNOCANCEL);
+ if (mbret == IDYES)
+ store_host_key(host, port, keytype, keystr);
+ if (mbret == IDCANCEL)
exit(0);
- store_host_key(host, port, keytype, keystr);
}
}