4 Commits

Author SHA1 Message Date
ec4d698021 Bump to 2.18.0~pre6 2026-03-30 13:04:00 -06:00
deepend-tildeclub
da06c71389 Merge pull request #177 from ZoiteChat/client-cert-importer
Add client SSL cert import action
2026-03-30 12:30:26 -06:00
0f508bf438 Sanitize OpenSSL env for client cert actions 2026-03-30 11:57:58 -06:00
97dd7c5d57 Add client SSL cert import action 2026-03-30 11:46:08 -06:00
6 changed files with 168 additions and 6 deletions

View File

@@ -1,6 +1,30 @@
ZoiteChat ChangeLog
=================
2.18.0~pre6 (2026-03-30)
- Applied app theme CSS to the menubar consistently across the app.
- Restored horizontal separator lines in menus.
- Improved Windows installer VC++ redistributable handling by failing loudly when missing and using the official Microsoft download endpoint.
- Fixed Windows locale path resolution in both GTK and text frontends.
- Fixed duplicate dialog buttons persisting in the UI.
- Fixed GTK auto-replace cursor snapback.
- Restored hiding of formatting control bytes so only formatted output is shown.
- Added one-click client SSL certificate tools, including generation with P-256 certificates.
- Added client SSL certificate import support in the network editor.
- Added 99-color support.
- Fixed xtext link hit-testing coordinates.
- Fixed short-palette fallback clobbering tab colors.
- Lazy-loads Preferences pages on first open for faster dialog startup.
- Removed unused UI icons.
- Added a None option for resetting the GTK3 theme back to system/default behavior.
- Added channel-only mode to Ctrl+F search.
- Disabled disk info in sysinfo.
- Wrapped the topic bar in a scroller with bounded height.
- Added close buttons to tabs.
- Fixed fallback GTK menu highlight states.
- Applied configured font preferences to the topic bar, channel tree, user list, and input box.
2.18.0~pre5 (2026-03-22)
------------------------
- Overhauled preferences/config saving: fully staged and transactional, debounced

View File

@@ -29,7 +29,47 @@
<id>zoitechat.desktop</id>
</provides>
<releases>
<release date="2026-03-22" version="2.18.0~pre5">
<release date="2026-03-30" version="2.18.0~pre6">
<description>
<p>GTK theme and UI:</p>
<ul>
<li>Applied app theme CSS to the menubar consistently across the app.</li>
<li>Restored horizontal separator lines in menus.</li>
<li>Fixed duplicate dialog buttons persisting in the UI.</li>
<li>Fixed GTK auto-replace cursor snapback.</li>
<li>Restored hiding of formatting control bytes so only formatted output is shown.</li>
<li>Fixed xtext link hit-testing coordinates.</li>
<li>Fixed short-palette fallback clobbering tab colors.</li>
<li>Added a None option for resetting the GTK3 theme back to system/default behavior.</li>
<li>Wrapped the topic bar in a scroller with bounded height.</li>
<li>Fixed fallback GTK menu highlight states.</li>
<li>Applied configured font preferences to the topic bar, channel tree, user list, and input box.</li>
<li>Removed unused UI icons.</li>
<li>Added close buttons to tabs.</li>
</ul>
<p>Preferences and search:</p>
<ul>
<li>Lazy-loads Preferences pages on first open for faster dialog startup.</li>
<li>Added channel-only mode to Ctrl+F search.</li>
</ul>
<p>Security and certificates:</p>
<ul>
<li>Added one-click client SSL certificate tools, including generation with P-256 certificates.</li>
<li>Added client SSL certificate import support in the network editor.</li>
</ul>
<p>Windows and packaging:</p>
<ul>
<li>Improved Windows installer VC++ redistributable handling by failing loudly when missing and using the official Microsoft download endpoint.</li>
<li>Fixed Windows locale path resolution in both GTK and text frontends.</li>
</ul>
<p>Other changes:</p>
<ul>
<li>Added 99-color support.</li>
<li>Disabled disk info in sysinfo.</li>
</ul>
</description>
</release>
<release date="2026-03-22" version="2.18.0~pre5">
<description>
<p>Preferences and config saving:</p>
<ul>

View File

@@ -1,5 +1,5 @@
project('zoitechat', 'c',
version: '2.18.0~pre5',
version: '2.18.0~pre6',
meson_version: '>= 0.55.0',
default_options: [
'c_std=c17',

View File

@@ -19,7 +19,7 @@ else:
if not hasattr(sys, 'argv'):
sys.argv = ['<zoitechat>']
VERSION = b'2.18.0~pre5'
VERSION = b'2.18.0~pre6'
PLUGIN_NAME = ffi.new('char[]', b'Python')
PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1]))
PLUGIN_VERSION = ffi.new('char[]', VERSION)

View File

@@ -91,6 +91,7 @@ static GtkWidget *edit_label_real;
static GtkWidget *edit_label_user;
static GtkWidget *edit_trees[N_TREES];
static GtkWidget *edit_button_cert_generate;
static GtkWidget *edit_button_cert_import;
static GtkWidget *edit_button_cert_info;
static GtkWidget *edit_button_cert_delete;
@@ -135,12 +136,98 @@ servlist_update_cert_buttons (ircnet *net)
if (edit_button_cert_generate)
gtk_widget_set_visible (edit_button_cert_generate, !has_cert);
if (edit_button_cert_import)
gtk_widget_set_visible (edit_button_cert_import, !has_cert);
if (edit_button_cert_info)
gtk_widget_set_visible (edit_button_cert_info, has_cert);
if (edit_button_cert_delete)
gtk_widget_set_visible (edit_button_cert_delete, has_cert);
}
static void
servlist_import_client_cert_cb (GtkWidget *button, gpointer userdata)
{
ircnet *net = (ircnet *)userdata;
GtkWidget *dialog;
GtkWidget *message;
GtkFileFilter *filter;
char *cert_dir;
char *cert_file;
char *source_file;
char *contents;
gsize length;
if (!net || !net->name || !net->name[0])
return;
dialog = gtk_file_chooser_dialog_new (_("Import Client Certificate"),
GTK_WINDOW (edit_win),
GTK_FILE_CHOOSER_ACTION_OPEN,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Open"), GTK_RESPONSE_ACCEPT,
NULL);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Certificate files"));
gtk_file_filter_add_pattern (filter, "*.pem");
gtk_file_filter_add_pattern (filter, "*.crt");
gtk_file_filter_add_pattern (filter, "*.cer");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All files"));
gtk_file_filter_add_pattern (filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
theme_manager_attach_window (dialog);
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
{
gtk_widget_destroy (dialog);
return;
}
source_file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
gtk_widget_destroy (dialog);
if (!source_file)
return;
cert_dir = g_build_filename (get_xdir (), "certs", NULL);
cert_file = servlist_get_cert_file (net);
contents = NULL;
length = 0;
if (cert_file &&
g_mkdir_with_parents (cert_dir, 0700) == 0 &&
g_file_get_contents (source_file, &contents, &length, NULL) &&
g_file_set_contents (cert_file, contents, length, NULL))
{
chmod (cert_file, 0600);
servlist_update_cert_buttons (net);
message = gtk_message_dialog_new (GTK_WINDOW (edit_win),
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
_("Client certificate imported for \"%s\"."),
net->name);
}
else
{
message = gtk_message_dialog_new (GTK_WINDOW (edit_win),
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
_("Failed to import client certificate for \"%s\"."),
net->name);
}
theme_manager_attach_window (message);
g_signal_connect_swapped (message, "response", G_CALLBACK (gtk_widget_destroy), message);
gtk_widget_show (message);
g_free (contents);
g_free (cert_file);
g_free (cert_dir);
g_free (source_file);
}
static void
servlist_generate_client_cert_cb (GtkWidget *button, gpointer userdata)
{
@@ -165,6 +252,7 @@ servlist_generate_client_cert_cb (GtkWidget *button, gpointer userdata)
gboolean success;
gint status;
char *argv[20];
char **envp;
if (!net || !net->name || !net->name[0])
return;
@@ -187,6 +275,7 @@ servlist_generate_client_cert_cb (GtkWidget *button, gpointer userdata)
crt_len = 0;
success = FALSE;
status = 0;
envp = g_environ_unsetenv (g_get_environ (), "LD_LIBRARY_PATH");
if (g_mkdir_with_parents (cert_dir, 0700) == 0 &&
g_file_set_contents (openssl_conf, conf_data, -1, NULL))
@@ -212,7 +301,7 @@ servlist_generate_client_cert_cb (GtkWidget *button, gpointer userdata)
argv[18] = subject;
argv[19] = NULL;
spawned = g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
spawned = g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH, NULL, NULL,
&stdout_data, &stderr_data, &status, NULL);
if (spawned && g_spawn_check_exit_status (status, NULL) &&
g_file_get_contents (key_file, &key_data, &key_len, NULL) &&
@@ -267,6 +356,7 @@ servlist_generate_client_cert_cb (GtkWidget *button, gpointer userdata)
g_free (openssl_conf);
g_free (cert_file);
g_free (cert_dir);
g_strfreev (envp);
#else
return;
#endif
@@ -284,6 +374,7 @@ servlist_cert_info_cb (GtkWidget *button, gpointer userdata)
gboolean spawned;
gint status;
char *argv[12];
char **envp;
cert_file = servlist_get_cert_file (net);
if (!cert_file)
@@ -292,6 +383,7 @@ servlist_cert_info_cb (GtkWidget *button, gpointer userdata)
stdout_data = NULL;
stderr_data = NULL;
status = 0;
envp = g_environ_unsetenv (g_get_environ (), "LD_LIBRARY_PATH");
argv[0] = "openssl";
argv[1] = "x509";
argv[2] = "-in";
@@ -305,7 +397,7 @@ servlist_cert_info_cb (GtkWidget *button, gpointer userdata)
argv[10] = "-sha256";
argv[11] = NULL;
spawned = g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
spawned = g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH, NULL, NULL,
&stdout_data, &stderr_data, &status, NULL);
if (spawned && g_spawn_check_exit_status (status, NULL) && stdout_data && stdout_data[0])
@@ -336,6 +428,7 @@ servlist_cert_info_cb (GtkWidget *button, gpointer userdata)
g_free (stdout_data);
g_free (stderr_data);
g_free (cert_file);
g_strfreev (envp);
#else
return;
#endif
@@ -2285,6 +2378,11 @@ servlist_open_edit (GtkWidget *parent, ircnet *net)
G_CALLBACK (servlist_generate_client_cert_cb), net);
gtk_box_pack_start (GTK_BOX (hbox_cert_buttons), edit_button_cert_generate, FALSE, FALSE, 0);
edit_button_cert_import = gtk_button_new_with_mnemonic (_("Import client SSL cert"));
g_signal_connect (G_OBJECT (edit_button_cert_import), "clicked",
G_CALLBACK (servlist_import_client_cert_cb), net);
gtk_box_pack_start (GTK_BOX (hbox_cert_buttons), edit_button_cert_import, FALSE, FALSE, 0);
edit_button_cert_info = gtk_button_new_with_mnemonic (_("Client SSL cert info"));
g_signal_connect (G_OBJECT (edit_button_cert_info), "clicked",
G_CALLBACK (servlist_cert_info_cb), net);

View File

@@ -1 +1 @@
2.18.0~pre5
2.18.0~pre6