X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkdlg.c;h=4eb4b010a4341781b3f4a5fd59bed27e39a3614d;hb=095072fa46b2d7b8beafaddb2f873d2f500a1e10;hp=7058c6e18e02628e37dbbe31c8606c63c5dbf774;hpb=9ddd071ec28050b3be572f25f3ae7d44e46e4039;p=PuTTY.git diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 7058c6e1..4eb4b010 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -3562,6 +3562,37 @@ int askalg(void *frontend, const char *algtype, const char *algname, } } +int askhk(void *frontend, const char *algname, const char *betteralgs, + void (*callback)(void *ctx, int result), void *ctx) +{ + static const char msg[] = + "The first host key type we have stored for this server\n" + "is %s, which is below the configured warning threshold.\n" + "The server also provides the following types of host key\n" + "above the threshold, which we do not have stored:\n" + "%s\n" + "Continue with connection?"; + char *text; + int ret; + + text = dupprintf(msg, algname, betteralgs); + ret = messagebox(GTK_WIDGET(get_window(frontend)), + "PuTTY Security Alert", text, + string_width("is ecdsa-nistp521, which is" + " below the configured warning threshold."), + FALSE, + "Yes", 'y', 0, 1, + "No", 'n', 0, 0, + NULL); + sfree(text); + + if (ret) { + return 1; + } else { + return 0; + } +} + void old_keyfile_warning(void) { /* @@ -3670,9 +3701,10 @@ void about_box(void *window) gtk_widget_show(w); { + char *buildinfo_text = buildinfo("\n"); char *label_text = dupprintf - ("%s\n\n%s\n\n%s", - appname, ver, + ("%s\n\n%s\n\n%s\n\n%s", + appname, ver, buildinfo_text, "Copyright " SHORT_COPYRIGHT_DETAILS ". All rights reserved"); w = gtk_label_new(label_text); gtk_label_set_justify(GTK_LABEL(w), GTK_JUSTIFY_CENTER);