diff options
Diffstat (limited to 'src/core/servers-setup.c')
-rw-r--r-- | src/core/servers-setup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index 27d9f1f0..90a447d4 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -179,6 +179,8 @@ static void server_setup_fill_server(SERVER_CONNECT_REC *conn, conn->ssl_cafile = g_strdup(sserver->ssl_cafile); if (conn->ssl_capath == NULL && sserver->ssl_capath != NULL && sserver->ssl_capath[0] != '\0') conn->ssl_capath = g_strdup(sserver->ssl_capath); + if (conn->ssl_ciphers == NULL && sserver->ssl_ciphers != NULL && sserver->ssl_ciphers[0] != '\0') + conn->ssl_ciphers = g_strdup(sserver->ssl_ciphers); server_setup_fill_reconn(conn, sserver); @@ -405,6 +407,7 @@ static SERVER_SETUP_REC *server_setup_read(CONFIG_NODE *node) rec->ssl_verify = config_node_get_bool(node, "ssl_verify", FALSE); rec->ssl_cafile = g_strdup(config_node_get_str(node, "ssl_cafile", NULL)); rec->ssl_capath = g_strdup(config_node_get_str(node, "ssl_capath", NULL)); + rec->ssl_ciphers = g_strdup(config_node_get_str(node, "ssl_ciphers", NULL)); if (rec->ssl_cafile || rec->ssl_capath) rec->ssl_verify = TRUE; if (rec->ssl_cert != NULL || rec->ssl_verify) @@ -430,7 +433,7 @@ static void server_setup_save(SERVER_SETUP_REC *rec) parentnode = iconfig_node_traverse("(servers", TRUE); node = config_node_nth(parentnode, index); if (node == NULL) - node = config_node_section(parentnode, NULL, NODE_TYPE_BLOCK); + node = iconfig_node_section(parentnode, NULL, NODE_TYPE_BLOCK); iconfig_node_clear(node); iconfig_node_set_str(node, "address", rec->address); @@ -445,6 +448,7 @@ static void server_setup_save(SERVER_SETUP_REC *rec) iconfig_node_set_bool(node, "ssl_verify", rec->ssl_verify); iconfig_node_set_str(node, "ssl_cafile", rec->ssl_cafile); iconfig_node_set_str(node, "ssl_capath", rec->ssl_capath); + iconfig_node_set_str(node, "ssl_ciphers", rec->ssl_ciphers); iconfig_node_set_str(node, "own_host", rec->own_host); iconfig_node_set_str(node, "family", @@ -486,6 +490,7 @@ static void server_setup_destroy(SERVER_SETUP_REC *rec) g_free_not_null(rec->ssl_pass); g_free_not_null(rec->ssl_cafile); g_free_not_null(rec->ssl_capath); + g_free_not_null(rec->ssl_ciphers); g_free(rec->address); g_free(rec); } @@ -526,7 +531,7 @@ static void read_servers(void) static void read_settings(void) { if (old_source_host == NULL || - strcmp(old_source_host, settings_get_str("hostname")) != 0) { + g_strcmp0(old_source_host, settings_get_str("hostname")) != 0) { g_free_not_null(old_source_host); old_source_host = g_strdup(settings_get_str("hostname")); |