mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Merge pull request #30 from vague666/patch-1
Allow -tls_ca{file,path} '' to unset an argument
This commit is contained in:
commit
10b5087ded
@ -213,12 +213,16 @@ static void cmd_server_add_modify(const char *data, gboolean add)
|
|||||||
value = g_hash_table_lookup(optlist, "ssl_cafile");
|
value = g_hash_table_lookup(optlist, "ssl_cafile");
|
||||||
if (value != NULL && *value != '\0')
|
if (value != NULL && *value != '\0')
|
||||||
rec->tls_cafile = g_strdup(value);
|
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");
|
value = g_hash_table_lookup(optlist, "tls_capath");
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
value = g_hash_table_lookup(optlist, "ssl_capath");
|
value = g_hash_table_lookup(optlist, "ssl_capath");
|
||||||
if (value != NULL && *value != '\0')
|
if (value != NULL && *value != '\0')
|
||||||
rec->tls_capath = g_strdup(value);
|
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");
|
value = g_hash_table_lookup(optlist, "tls_ciphers");
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user