X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windlg.c;h=8ad85bbe4196a1f36015585ca9952809ee5e6d18;hb=52a688abd1a9f3e1b7b5349f27407f1304aa5401;hp=641dd650e4ed020f9062e1a90ab3a99c51d79b70;hpb=fb473cc16c4e55af8b34cd01b1d03be8b98d752e;p=PuTTY.git diff --git a/windlg.c b/windlg.c index 641dd650..8ad85bbe 100644 --- a/windlg.c +++ b/windlg.c @@ -2512,7 +2512,9 @@ void verify_ssh_host_key(char *host, int port, char *keytype, "%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[] = @@ -2534,7 +2536,6 @@ void verify_ssh_host_key(char *host, int port, char *keytype, static const char mbtitle[] = "PuTTY Security Alert"; - char message[160 + /* sensible fingerprint max size */ (sizeof(absentmsg) > sizeof(wrongmsg) ? @@ -2561,10 +2562,11 @@ void verify_ssh_host_key(char *host, int port, char *keytype, 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); } }