1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

Merge pull request #30 from vague666/patch-1

Allow -tls_ca{file,path} '' to unset an argument
This commit is contained in:
ailin-nemui 2021-09-02 23:46:43 +02:00 committed by GitHub
commit 10b5087ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,12 +213,16 @@ static void cmd_server_add_modify(const char *data, gboolean add)
value = g_hash_table_lookup(optlist, "ssl_cafile");
if (value != NULL && *value != '\0')
rec->tls_cafile = g_strdup(value);
else if (value != NULL && *value == '\0')
g_free_and_null(rec->tls_cafile);
value = g_hash_table_lookup(optlist, "tls_capath");
if (value == NULL)
value = g_hash_table_lookup(optlist, "ssl_capath");
if (value != NULL && *value != '\0')
rec->tls_capath = g_strdup(value);
else if (value != NULL && *value == '\0')
g_free_and_null(rec->tls_capath);
value = g_hash_table_lookup(optlist, "tls_ciphers");
if (value == NULL)