mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
Implement hostkey-prompt-type everywhere except Macintosh.
[originally from svn r3307]
This commit is contained in:
parent
d02ea52abc
commit
10d4930b09
16
console.c
16
console.c
@ -47,14 +47,14 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"The server's host key is not cached in the registry. You\n"
|
||||
"have no guarantee that the server is the computer you\n"
|
||||
"think it is.\n"
|
||||
"The server's key fingerprint is:\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char absentmsg[] =
|
||||
"The server's host key is not cached in the registry. You\n"
|
||||
"have no guarantee that the server is the computer you\n"
|
||||
"think it is.\n"
|
||||
"The server's key fingerprint is:\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you trust this host, enter \"y\" to add the key to\n"
|
||||
"PuTTY's cache and carry on connecting.\n"
|
||||
@ -71,7 +71,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"server administrator has changed the host key, or you\n"
|
||||
"have actually connected to another computer pretending\n"
|
||||
"to be the server.\n"
|
||||
"The new key fingerprint is:\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char wrongmsg[] =
|
||||
@ -81,7 +81,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"server administrator has changed the host key, or you\n"
|
||||
"have actually connected to another computer pretending\n"
|
||||
"to be the server.\n"
|
||||
"The new key fingerprint is:\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you were expecting this change and trust the new key,\n"
|
||||
"enter \"y\" to update PuTTY's cache and continue connecting.\n"
|
||||
@ -106,18 +106,18 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
|
||||
if (ret == 2) { /* key was different */
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, wrongmsg_batch, fingerprint);
|
||||
fprintf(stderr, wrongmsg_batch, keytype, fingerprint);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
fprintf(stderr, wrongmsg, fingerprint);
|
||||
fprintf(stderr, wrongmsg, keytype, fingerprint);
|
||||
fflush(stderr);
|
||||
}
|
||||
if (ret == 1) { /* key was absent */
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, absentmsg_batch, fingerprint);
|
||||
fprintf(stderr, absentmsg_batch, keytype, fingerprint);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
fprintf(stderr, absentmsg, fingerprint);
|
||||
fprintf(stderr, absentmsg, keytype, fingerprint);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
|
@ -2296,7 +2296,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
static const char absenttxt[] =
|
||||
"The server's host key is not cached. You have no guarantee "
|
||||
"that the server is the computer you think it is.\n"
|
||||
"The server's key fingerprint is:\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you trust this host, press \"Accept\" to add the key to "
|
||||
"PuTTY's cache and carry on connecting.\n"
|
||||
@ -2310,7 +2310,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"cached. This means that either the server administrator "
|
||||
"has changed the host key, or you have actually connected "
|
||||
"to another computer pretending to be the server.\n"
|
||||
"The new key fingerprint is:\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you were expecting this change and trust the new key, "
|
||||
"press \"Accept\" to update PuTTY's cache and continue connecting.\n"
|
||||
@ -2330,7 +2330,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
if (ret == 0) /* success - key matched OK */
|
||||
return;
|
||||
|
||||
text = dupprintf((ret == 2 ? wrongtxt : absenttxt), fingerprint);
|
||||
text = dupprintf((ret == 2 ? wrongtxt : absenttxt), keytype, fingerprint);
|
||||
|
||||
ret = messagebox(GTK_WIDGET(get_window(frontend)),
|
||||
"PuTTY Security Alert", text,
|
||||
|
@ -41,13 +41,13 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
static const char absentmsg_batch[] =
|
||||
"The server's host key is not cached. You have no guarantee\n"
|
||||
"that the server is the computer you think it is.\n"
|
||||
"The server's key fingerprint is:\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char absentmsg[] =
|
||||
"The server's host key is not cached. You have no guarantee\n"
|
||||
"that the server is the computer you think it is.\n"
|
||||
"The server's key fingerprint is:\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you trust this host, enter \"y\" to add the key to\n"
|
||||
"PuTTY's cache and carry on connecting.\n"
|
||||
@ -63,7 +63,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"cached. This means that either the server administrator\n"
|
||||
"has changed the host key, or you have actually connected\n"
|
||||
"to another computer pretending to be the server.\n"
|
||||
"The new key fingerprint is:\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char wrongmsg[] =
|
||||
@ -72,7 +72,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"cached. This means that either the server administrator\n"
|
||||
"has changed the host key, or you have actually connected\n"
|
||||
"to another computer pretending to be the server.\n"
|
||||
"The new key fingerprint is:\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you were expecting this change and trust the new key,\n"
|
||||
"enter \"y\" to update PuTTY's cache and continue connecting.\n"
|
||||
@ -97,18 +97,18 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
|
||||
if (ret == 2) { /* key was different */
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, wrongmsg_batch, fingerprint);
|
||||
fprintf(stderr, wrongmsg_batch, keytype, fingerprint);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
fprintf(stderr, wrongmsg, fingerprint);
|
||||
fprintf(stderr, wrongmsg, keytype, fingerprint);
|
||||
fflush(stderr);
|
||||
}
|
||||
if (ret == 1) { /* key was absent */
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, absentmsg_batch, fingerprint);
|
||||
fprintf(stderr, absentmsg_batch, keytype, fingerprint);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
fprintf(stderr, absentmsg, fingerprint);
|
||||
fprintf(stderr, absentmsg, keytype, fingerprint);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
|
8
windlg.c
8
windlg.c
@ -711,7 +711,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"The server's host key is not cached in the registry. You\n"
|
||||
"have no guarantee that the server is the computer you\n"
|
||||
"think it is.\n"
|
||||
"The server's key fingerprint is:\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you trust this host, hit Yes to add the key to\n"
|
||||
"%s's cache and carry on connecting.\n"
|
||||
@ -728,7 +728,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
"server administrator has changed the host key, or you\n"
|
||||
"have actually connected to another computer pretending\n"
|
||||
"to be the server.\n"
|
||||
"The new key fingerprint is:\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you were expecting this change and trust the new key,\n"
|
||||
"hit Yes to update %s's cache and continue connecting.\n"
|
||||
@ -749,7 +749,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
if (ret == 2) { /* key was different */
|
||||
int mbret;
|
||||
char *message, *title;
|
||||
message = dupprintf(wrongmsg, appname, fingerprint, appname);
|
||||
message = dupprintf(wrongmsg, appname, keytype, fingerprint, appname);
|
||||
title = dupprintf(mbtitle, appname);
|
||||
mbret = MessageBox(NULL, message, title,
|
||||
MB_ICONWARNING | MB_YESNOCANCEL);
|
||||
@ -763,7 +763,7 @@ void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
if (ret == 1) { /* key was absent */
|
||||
int mbret;
|
||||
char *message, *title;
|
||||
message = dupprintf(absentmsg, fingerprint, appname);
|
||||
message = dupprintf(absentmsg, keytype, fingerprint, appname);
|
||||
title = dupprintf(mbtitle, appname);
|
||||
mbret = MessageBox(NULL, message, title,
|
||||
MB_ICONWARNING | MB_YESNOCANCEL);
|
||||
|
Loading…
Reference in New Issue
Block a user