]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/gtkdlg.c
New FAQ entry for 32-bit vs 64-bit.
[PuTTY.git] / unix / gtkdlg.c
index 7058c6e18e02628e37dbbe31c8606c63c5dbf774..f16119488e035018cb349432207b3b0e05373d0c 100644 (file)
@@ -3304,6 +3304,7 @@ int do_config_box(const char *title, Conf *conf, int midsession,
 
     dlg_cleanup(&dp);
     sfree(selparams);
+    ctrl_free_box(ctrlbox);
 
     return dp.retval;
 }
@@ -3562,6 +3563,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 +3702,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);